Definition from Wiktionary, the free dictionary
headmaster (plural headmasters)
The most senior master in a school
The term is gender-specific, and refers to a male in the position. A female in the same role would be called a headmistress.