Depends on what type of headset you have. Threadless as in modern A Head - will have 2 bolts on the side of the stem, loosen them and then tighten the recessed bolt in the top of the stem gently until the slack is taken up. Then gently tighten the 2 clamp bolts that you prevously loosened. Apply front brake and rock the bike forwards and backwards. If all play gone and steering nice and smooth, job done. If still play in system repeat process. If steering too tight loosen side bolts and back off recesssed nut slightly, then tighten side bolts. Repeat as necessary. If the steering feels rough and gritty the bearings in the headset are probably rusty and in need of replacement.
if the stem is an old fashioned quill stem, there will be a large ring at the top of the headset where the stem enters. This
may be secured by a large nut. Tighten the ring up until the forks don't rock when front brake applied. Then tighten the lock nut ensuring that the adjusting ring stays in place and doesn't tighten as you tighten the lock nut. Again, if steering feels rough and gtitty the bearings may need lubricating or replacing.