Just the same way wind instruments work. Make white noise, and pass it through a tube of a certain length, an it filters out all the frequencies that don't resonate, leaving just the frequency you want and some of its harmonics.