For the headset, plus one on the Park Tools site.
It's acutally very easy. Loosen the bolts on the stem (the ones on the side around the steerer tube.)
Tighten the bolt on the top cap. You want it tight enough that there is no play in the headset, but the fork and handlebar still turn freely. Realize you're not tightening this bolt to hold the headset together. You're just preloading the headset bearings until you tighten the stem bolts again.
Tighten the stem bolts (to the recommended torque- a torque wrench is your friend.).
Test. Take the bike and apply the front brake, rock the bike forward until the back wheel is off the ground. If you feel play in the fork (sort of a clunk.) the headset is still too loose. If the bike comes up as a single unit with no play, and the handlebars/fork pivot freely you're good to go.