25 When they found him on the other side of the lake, they asked him, "Rabbi, when did you get here?"
26 Jesus answered, "I tell you the truth, you are looking for me, not because you saw miraculous signs but because you ate the loaves and had your fill. 27 Do not work for food that spoils, but for food that endures to eternal life, which the Son of Man will give you. On him God the Father has placed his seal of approval."
28 Then they asked him, "What must we do to do the works God requires?"
29 Jesus answered, "The work of God is this: to believe in the one he has sent."
This is expressing salvation by faith and not works. Jesus goes into depth throughout the gospels on what exactly it means to believe in Him.
30 So they asked him, "What miraculous sign then will you give that we may see it and believe you? What will you do? 31 Our forefathers ate the manna in the desert; as it is written: 'He gave them bread from heaven to eat.'"
32 Jesus said to them, "I tell you the truth, it is not Moses who has given you the bread from heaven, but it is my Father who gives you the true bread from heaven. 33 For the bread of God is he who comes down from heaven and gives life to the world."
It is not the Law, from Moses, that saves, but it merely leads us to the Savior.
34 "Sir," they said, "from now on give us this bread."
35 Then Jesus declared, "I am the bread of life. He who comes to me will never go hungry, and he who believes in me will never be thirsty. 36 But as I told you, you have seen me and still you do not believe. 37 All that the Father gives me will come to me, and whoever comes to me I will never drive away. 38 For I have come down from heaven not to do my will but to do the will of him who sent me. 39 And this is the will of him who sent me, that I shall lose none of all that he has given me, but raise them up at the last day. 40 For my Father's will is that everyone who looks to the Son and believes in him shall have eternal life, and I will raise him up at the last day."
I hear many people doubt their salvation, and hope that their works are good enough to merit heaven when God judges them. Jesus makes it clear that all who believe in Him will be raised up to eternal life.
41 At this the Jews began to grumble about him because he said, "I am the bread that came down from heaven." 42 They said, "Is this not Jesus, the son of Joseph, whose father and mother we know? How can he now say, 'I came down from heaven'?"
43 "Stop grumbling among yourselves," Jesus answered. 44 "No one can come to me unless the Father who sent me draws him, and I will raise him up at the last day. 45 It is written in the Prophets: 'They will all be taught by God.' Everyone who listens to the Father and learns from him comes to me. 46 No one has seen the Father except the one who is from God; only he has seen the Father. 47 I tell you the truth, he who believes has everlasting life. 48 I am the bread of life. 49 Your forefathers ate the manna in the desert, yet they died. 50 But here is the bread that comes down from heaven, which a man may eat and not die. 51 I am the living bread that came down from heaven. If anyone eats of this bread, he will live forever. This bread is my flesh, which I will give for the life of the world."
52 Then the Jews began to argue sharply among themselves, "How can this man give us his flesh to eat?"
53 Jesus said to them, "I tell you the truth, unless you eat the flesh of the Son of Man and drink his blood, you have no life in you. 54 Whoever eats my flesh and drinks my blood has eternal life, and I will raise him up at the last day. 55 For my flesh is real food and my blood is real drink. 56 Whoever eats my flesh and drinks my blood remains in me, and I in him. 57 Just as the living Father sent me and I live because of the Father, so the one who feeds on me will live because of me. 58 This is the bread that came down from heaven. Your forefathers ate manna and died, but he who feeds on this bread will live forever." 59 He said this while teaching in the synagogue in Capernaum.
Just as to the woman at the well, Jesus offered Living Water, to anyone who eats regular bread, He offers Bread of Life. Jesus uses many more metaphors to try to explain to his disciples that they need to have an eternal, spiritual perspective. Many people did not understand what He was referring to till after His death on the cross. Looking back in hindsight, it is much easier to understand what He was conveying through all his parables, namely that the only way to be reconciled to a holy, just God is through the shed blood of the Son covering over our sins.