The bill of ball caps is designed to keep the sun out of ones eyes. For a better part of a century.
A cap is a form of headgear. Caps have crowns that fit very close to the head. They are typically designed for warmth, and often incorporate a visor to block sunlight from the eyes. They come in many shapes, sizes, and various different brands.