Commandant is a title that has been used in many organizations across the galaxy. Among those to have used the term, are Klingons, the Kradin, and Humans. Typically, the title is applied to someone who is in charge of a group of personnel, such as an assault force, training faculty, or prison guards.
Starfleet uses the title for the officer in charge of Starfleet Academy, and is known as the Commandant of Starfleet Academy. The Mirror-Starfleet uses this as well, to denote those equivallent to Commander-usually in charge of a starship's platoon for away team missions. (TOS movie: Star Trek VI: The Undiscovered Country; DS9 episode: "Paradise Lost"' VOY episode: "Nemesis"; ST novel: Spectre)