The headset sits inside the head tube of your frame. The steerer tube for the fork and, in this case, the quill (threaded) stem sit inside it. The bearings are inside it so that your bars/stem/fork can turn.
With a threadless headset (which are used on most higher end bikes - except for the Rivendell nut crowd), the steering tube for the fork extends above the headset and the stem clamps around the steering tube.
Is that all clear as mud? Sheldon Brown probably has better explanations.
Frends know gud humors when dey is hear it. ~ Da Crockydiles of ZZE.