Goku likely learned how to fly from Kami during his long training at Kami's Lookout, as he was unable to do so before and demonstrated his abilities to conclude his World Martial Arts Tournament fight with Piccolo. Perhaps he uses the more efficient technique described by Piccolo in the anime since it was taught to Goku by Kami, which is likely a Namekian flying technique.
In the original Japanese dub of episode 3 of Dragon Ball Z, "Unlikely Alliance", when Goku asked if Piccolo could keep up with the Flying Nimbus, the Namekian replied that his own flying technique is significantly different and superior than the flight technique used by the Z Fighters, allowing him to fly faster than the Nimbus.
Gohan taught Goten and Videl how to fly during the Great Saiyaman Saga. Gohan further explained that anyone with sufficient power and the proper training could learn the ability. Mr. Satan tried to self-teach this technique, but he failed miserably.
The way Gohan described the secret to fly, one would assume that the flyer is putting their ki underneath them, forcing it down similar to an engine or helicopter pushing air down to rise from the ground.