After the French Revolution installed a Republic as the government in France, other European countries and their monarchs launched invasions against the French. This is how General Napoleon Bonaparte came to power in the French military. Even though he had lost some campaigns in Egypt, Napoleon was overwhelmingly popular in France because of his victories against Austria and Italy. In 1801, when Britain allied with Russia and Austria, the French government was in crisis. This allowed a takeover- the coup d'etat.
Napoleon came back to France and helped stage a coup d'etat (an overthrow of the government/regime, usually though not necessarily violent). After successfully overthrowing the Republic, Napoleon became first consul of Rome (a title that echoed back to the Roman Republic). A year later, he became consul for life. Shortly afterwards, a plebiscite (a direct electorate vote) was held and Napoleon was made Emperor of France. As Emperor, he centralized government, created the Bank of France, brought back Catholicism, and formed law with the Code Napoleon.