The headset on a bike is the most important bearing on the bike. It allows you to balance the forces while you're riding so you don't fall over. If it's too loose or too tight the bike may be uncomfortable to ride and the headset will wear out faster than if it's correctly adjusted
Grab the rear section of the bike – the part connected to the back wheel – at the front of the top tube. Lift the front wheel off the ground. Turn the bars. They should rotate smoothly left to right with no clicks or sticking points. The most likely problem is the front wheel tending to rest at the straighter head point.
Watch out for interference from any control cables. It may give a false negative.
Detecting play in the headset on a bike
You can detect tiny amounts of play in a headset on a bike by placing your finger at the point where the top tube meets the forks when make your check.