The moustache is a strip of hair above the lips.
A possible function of the moustache is to prevent sweat from dripping into the mouth. This prevents one from choking from his own sweat.
Males sweat more than females because they often fight with other males for mates. Often such fights are intense and require a lot of oxygen. Therefore, they will open their mouths to obtain more oxygen. However, this makes them vulnerable because sweat could drip into their mouths, inhaling the sweat and choking on it. The moustache absorbs sweat preventing one from inhaling his sweat. This could explain why males have moustaches and females do not. This could also explain why males have thicker eyebrows than females.