On many occasions when the independence wars are over, governments formed by the same revolutionaries or the leaders who fought the war to be independent. For example, in the United States the leaders of the Independence of America became the first presidents or leaders of the new country, such as George Washington or Thomas Jefferson; in Latin American countries, also the leaders who led the revolutions (and survived the whole struggle) became the presidents or leaders of the newly formed countries.
There are democrats and republican parties from each state and the person running for president is trying to get for example the most democratic votes / republican votes depends what party they are running for