These are the words Jesus spoke after feeding the 5,000.
26 "Jesus answered them and said, 'Verily, verily, I say unto you, Ye seek me, not because ye saw the miracles, but because ye did eat of the loaves, and were filled.
27 Labour not for the meat which perisheth, but for that meat which endureth unto everlasting life, which the Son of man shall give unto you: for him hath God the Father sealed.'"
28 "Then said they unto him, 'What shall we do, that we might work the works of God?'"
29 "Jesus answered and said unto them,
'This is the work of God, that ye believe on him whom he hath sent.'
30 "They said therefore unto him, 'What sign shewest thou then, that we may see, and believe thee? what dost thou work?
31 Our fathers did eat manna in the desert; as it is written, He gave them bread from heaven to eat.'"
32 "Then Jesus said unto them, 'Verily, verily, I say unto you, Moses gave you not that bread from heaven; but my Father giveth you the true bread from heaven.
33 For the bread of God is he which cometh down from heaven, and giveth life unto the world.'"
34 "Then said they unto him, 'Lord, evermore give us this bread.'"
35 "And Jesus said unto them, 'I am the bread of life: he that cometh to me shall never hunger; and he that believeth on me shall never thirst.
36 But I said unto you, That ye also have seen me, and believe not.
37 All that the Father giveth me shall come to me; and him that cometh to me I will in no wise cast out.
38 For I came down from heaven, not to do mine own will, but the will of him that sent me.
39 And this is the Father's will which hath sent me, that of all which he hath given me I should lose nothing, but should raise it up again at the last day.
40 And this is the will of him that sent me, that every one which seeth the Son, and believeth on him, may have everlasting life: and I will raise him up at the last day.'"
41 "The Jews then murmured at him, because he said, 'I am the bread which came down from heaven.'"
42 "And they said, 'Is not this Jesus, the son of Joseph, whose father and mother we know? how is it then that he saith, I came down from heaven?'"
43 "Jesus therefore answered and said unto them, 'Murmur not among yourselves.
44 No man can come to me, except the Father which hath sent me draw him: and I will raise him up at the last day.
45 It is written in the prophets, And they shall be all taught of God. Every man therefore that hath heard, and hath learned of the Father, cometh unto me.
46 Not that any man hath seen the Father, save he which is of God, he hath seen the Father.
47 Verily, verily, I say unto you, He that believeth on me hath everlasting life.
48 I am that bread of life.
49 Your fathers did eat manna in the wilderness, and are dead.
50 This is the bread which cometh down from heaven, that a man may eat thereof, and not die.
51 I am the living bread which came down from heaven: if any man eat of this bread, he shall live for ever: and the bread that I will give is my flesh, which I will give for the life of the world.'"
52 "The Jews therefore strove among themselves, saying, 'How can this man give us his flesh to eat?'"
53 "Then Jesus said unto them, 'Verily, verily, I say unto you, Except ye eat the flesh of the Son of man, and drink his blood, ye have no life in you.
54 Whoso eateth my flesh, and drinketh my blood, hath eternal life; and I will raise him up at the last day.
55 For my flesh is meat indeed, and my blood is drink indeed.
56 He that eateth my flesh, and drinketh my blood, dwelleth in me, and I in him.
57 As the living Father hath sent me, and I live by the Father: so he that eateth me, even he shall live by me.
58 This is that bread which came down from heaven: not as your fathers did eat manna, and are dead: he that eateth of this bread shall live for ever.'"
59 "These things said he in the synagogue, as he taught in Capernaum.
60 Many therefore of his disciples, when they had heard this, said, 'This is an hard saying; who can hear it?'"
61 "When Jesus knew in himself that his disciples murmured at it, he said unto them, 'Doth this offend you?
62 What and if ye shall see the Son of man ascend up where he was before?
63 It is the spirit that quickeneth; the flesh profiteth nothing: the words that I speak unto you, they are spirit, and they are life.'" - John 6:26-63
Jesus was telling a parable here. He did not mean, of course, that He was or is literal bread or that, therefore, people should eat His literal flesh or drink His literal blood. (And indeed, none of His disciples ever did so). He was telling them that salvation is found in Him alone, and that salvation would be made possible by His coming sacrifice on the cross (where He offered His body and blood).
He is equating belief/faith in Him (by which people are saved and will not perish eternally, but have everlasting life) to the act of eating. This is a parable, teaching a spiritual truth and not meant to be taken literally. We also know this because the Jews were in fact forbidden to eat/drink blood, and cannibalism is abhorrent to God.
In telling this parable, as an example, he refers to the ancestors of those present who ate manna in the wilderness (a type of shadow of Christ) but still perished, saying He is the true bread from heaven. Those who ate the manna still perished, but those who "eat" (believe) in Him will never die. (They will have eternal life).
Unfortunately, many did not understand this parable and the spiritual truth it conveys at the time Jesus first taught it either, thus they actually thought He was advocating cannibalism. Even His disciples were put off and offended. (As would be anyone who thought Jesus was speaking literally).
Jesus also told a similar parable to the Samaritan woman at the well. (John 4) He quite often spoke in parables, as we know, using physical things to convey spiritual truth.
This is why we need to rightly divide the word of truth.