President was a title sometimes given to heads of state, or someone who presided over a governmental or corporate body.
The United States of America's Executive Branch was governed by a president. Trip Tucker, hearing that Mestral may have lived on Earth from 1957 until well into the 22nd century, reckoned that the Vulcan explorer would have lived through "what – thirty presidents?" The first two of these would have been Dwight D. Eisenhower and John F. Kennedy. (TOS: "The Cage"; DS9: "Little Green Men"; ENT: "Carbon Creek")
Altair VI elected a new planetary president in 2267. The USS Enterprise, along with two other Federation starships, was scheduled to attend the president's inauguration. The Enterprise, however, diverted to Vulcan when Spock entered pon farr. (TOS: "Amok Time")
After negotiating Cardassia's annexation into the Dominion in 2373, Dukat effectively became the emperor of the Cardassian people, though still a servant of the Founders. However, he chose to maintain his rank of gul as opposed to legate because he felt it was more "hands on," and because the titles of emperor, president, first minister and Emissary seemed too "pretentious." (DS9: "Ties of Blood and Water")
"Mr. President" was a formal salutation used when addressing the president of a government.
Both a Human Federation president and an Efrosian Federation president were referred to as "Mr. President", as well as President Jaresh-Inyo. (Star Trek IV: The Voyage Home; Star Trek VI: The Undiscovered Country; DS9: "Homefront", "Paradise Lost")