It's all muscle memory, of course, but there's also a process of "coarse adjustment" and "fine adjustment", based on the configurations of the black keys. (dtldarek mentions this in his answer as well.)
Say you have your 3rd finger on C4, and want to next play A2 with 5. You reach out towards the gap between Bb2 and C#3 with your 4th finger, and when you find it, you can easily locate A2 with your 5th from there.
If you watch someone sight reading, or singing and playing stride figures in the left hand at the same time, or whatever, you'll notice that they often feel their way around the piano in this way. As for teaching, any of my teachers who taught sight reading mentioned this, although they also said something to the effect of "the only way to learn sight reading is to sight read."
All that said, there are times when you just have to do it. Beethoven was said to be adept at leaps on the piano, and there are places in his sonatas that bear this out. Here's a snippet from his Sonata No. 4, Op. 7:
The tempo is allegro, and you have all you can do to just fly up to the F from the A.
And then we have this from our friend Liszt (from "La Campanella"):
And no, you can't go feeling around the black keys here, either. :) You have to develop the same level of precision in your arms and elbows as you have in your fingers and wrists, and move your hand back and forth rapidly from the elbow. (Not that I can do it very well...)