The magician must not have specified what kind of “under water” he meant. The only way the boy could have won was to get a cup of water and place it on his head. That said, the cup must not have spilled or left his head, but that’s another issue of physics all together.
So, the boy was technically “under water” for ten minutes as long as the cup stayed balanced on his head, and the water didn’t spill. If the magician had meant that the volunteer had to be completely submerged in water for ten minutes, he wasn’t specific enough with his restrictions. That said, the magician probably had a good laugh over the way the boy defeated his puzzle.