The headset is the rotating interface between the bicycle frame and forks. Basically it is a set of bearings in specially constructed cages concealed in the top and bottom ends of the head tube at the font of the bike which allow the fork to turn in the frame. The bottom cage is between the fork and head tube while the top cage is between the handlebar stem and frame.
There are two main types of headsets - threaded, also known as Quill, and threadless; the main difference being how they are connected to the fork. .
Threaded headsets are in cups on the outside of the frame and held in place via a locknut around a threaded fork. This is the traditional version of the headset and is only available in a 1" diameter.
Threadless headsets sit in cups either on the outside or inside of the head tube and are held in place by the stem clamping round the fork steerer tube. Threadless headsets are available in several different sizes - 1", 1 1/8", 1 1/4" and 1.5" with size depending on the type of bicycle and its intended use.