Docetism is a heresy with many variations, again, as with most heresies, attacking the nature of Christ. It generally teaches, among the variations, that Jesus only "appeared" to have a body and was not incarnate.
This heresy developed from the dualistic philosophy, which viewed matter as inherently evil. Therefore, God could not be associated with matter; and God, being perfect and infinite, could not suffer. Thus, God, as the Word, could not become flesh per John 1:1, 14.
This belief denies a true incarnation of Jesus suffering on the cross and rising from the dead.
This heresy is refuted by the Apostle John in 1 John 4:2-3, "By this you know the Spirit of God: every spirit that confesses that Jesus Christ has come in the flesh is from God; 3 and every spirit that does not confess Jesus is not from God; and this is the spirit of the antichrist, of which you have heard that it is coming, and now it is already in the world."
Also, 2 John 7, "For many deceivers have gone out into the world, those who do not acknowledge Jesus Christ as coming in the flesh. This is the deceiver and the antichrist."
Ignatius of Antioch (died 98/117) and Irenaeus (115-190), and Hippolytus (170-235) wrote against the error in the early part of the second century.
The Council of Chalcedon condemned Docetism in 451.