1 John says every spirit that confesses Jesus Christ has come in the flesh is from God. It contrasts this with not confessing Jesus, which it associates with error and antichrist. See 1 John 4:2–3.
In 1 John 4:1–6 the writer warns the community not to accept every claimed spiritual message without checking it. This unit sits in a larger stretch where the letter marks out signs of what is genuine versus deceptive within the community.
The passage assumes that spiritual-sounding messages are not automatically trustworthy. It speaks as if multiple voices claim spiritual backing, and some of them are “false prophets” (explicit). The writer gives a central, public test: whether a message openly affirms that Jesus Christ has come “in the flesh” (explicit).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 1 John 4:2-3, then read the surrounding section so the answer stays connected to the passage's flow.
2By this you know the Spirit of God: every spirit who confesses that Jesus Christ has come in the flesh is of God,
3and every spirit who doesn`t confess that Jesus Christ has come in the flesh is not of God, and this is the spirit of the antichrist, of whom you have heard that it comes. Now it is in the world already.