[1] A fairlead can be a hook, ring, pulley, chock, or hawse (hole) sometimes surrounded by rollers.
A fairlead can also be used to stop a straight run of line from vibrating or rubbing on another surface.
A ring fairlead holds the halyard parallel to the mast so its cleat can be located near to the cockpit.
When attached to a track to make its position adjustable, a fairlead leading a jibsheet to a winch can be moved fore, aft and sometimes side to side to allow a sailor to tune sail trim to wind conditions.
At the base of the flagstaff is usually a hook so the flag halyard can be held parallel to the pole, and still tied off to a cleat beside the door, rather than above.