A cap is a type of headwear that typically has a visor and is worn for protection from the sun or as a fashion accessory.