"Then they said to Him, 'What shall we do, that we may work the works of God?' Jesus answered and said to them, 'This is the work of God, that you believe in Him whom He sent.' Therefore they said to Him, 'What sign will You perform then, that we may see it and believe You? What work will You do? Our fathers ate the manna in the desert; as it is written, "He gave them bread from heaven to eat."' Then Jesus said to them, 'Most assuredly, I say to you, Moses did not give you the bread from heaven, but My Father gives you the true bread from heaven. For the bread of God is He who comes down from heaven and gives life to the world.' Then they said to Him, 'Lord, give us this bread always.'"
The question they pose to Jesus seems to be sincere - "What shall we do, that we may work the works of God?" (John 6:28). Jesus had mentioned eternal life in the prior verse and perhaps they thought there was some list of required deeds that Jesus would instruct them to perform. Some, who were thinking in terms of a physical kingdom (cf. 6:15) likely hoped that Jesus would tell them that their work for God would be to overthrow the Roman government and stop its subjugation of the Jewish people.
Jesus responded in 6:29 - "This is the work of God, that you believe in Him whom He sent." The work that God wanted them to do was to believe that Jesus was sent from above and therefore submit themselves to Him. In this way they could be justified, not on the basis of perfectly keeping laws, but on the basis of believing in Jesus.
There are some who claim that no works of any kind are involved in salvation. They label baptism as a "work," and then attempt to ignore its importance in the salvation of man. However, Jesus' words here clearly show the absurdity of trying to remove all works from the plan of salvation. If all works are eliminated, then faith itself would be excluded, for Jesus has just declared that faith is a work (cf. I Thess. 1:3). Faith is a work "of God" in that it is something which God requires of man, but it is still something that man himself must do. The same is true with repentance, baptism for the remission of sins, and any other condition of salvation (cf. Acts 2:38; 17:30). Baptism, like faith, is not a work of human merit, but it is a matter of accepting the word of God and having faith in the "working of God" (Col. 2:12; cf. Luke 7:30; I Pet. 3:21).
The Jews were slowly starting to understand that Jesus was claiming to be the Messiah. Thus, they asked for proof - "What sign will You perform then, that we may see it and believe You?" (John 6:30). Evidently all of the miracles which He had manifested thus far were not enough to establish Him as the Christ in their minds!
They then refer to their ancestors who ate manna from heaven. From Jesus' response in 6:32, it appears that they are making a false comparison between Himself and Moses. Perhaps they are thinking along these lines: Moses provided bread from heaven for years for well over half-a-million men, but You provided barley bread for only 5000 men yesterday and You expect us to believe that You are the Messiah, one greater than Moses?
It is interesting to observe that this dialogue is similar to Jesus' conversation with the Samaritan woman in John 4, though the outcomes are quite different. On that occasion, the woman unfavorably compared Jesus to Jacob the well-digger and asked about living water. Here these Jews unfavorably compare Jesus to Moses the manna-giver and inquire about the bread of life.
Jesus makes it clear that "Moses did not give you the bread from heaven, but My Father gives you the true bread from heaven" (John 6:32; cf. Exo. 16:4,15). Also, manna was not the "true bread," but now God has provided the "true bread from heaven."
Jesus elaborates by saying that the true bread from heaven is a Person who has come down from heaven with the purpose of giving spiritual life to the world. This true bread was real and lasting. It wasn't like the manna which quickly spoiled (cf. Exo. 16:19,20). It would make eternal life possible, but manna could only temporarily sustain physical life.
The Jews respond in John 6:34 - "Lord, give us this bread always." Like the Samaritan woman at the well (cf. 4:13-15), they fail to discern that Jesus is speaking symbolically about Himself. They want the bread from God that will bring life, but they mistakenly believe that it is physical bread.