Through a great many steps in between and a backdrop of national chaos and revolution. The start of the arc of Napoleon's rise to power begins with his military career. He had served only 4 years in the military before the revolution, which threw the country completely upside down. The French revolution is an event that is hard to explain succinctly and in many ways was even more dramatic a transformation of the country than the Russian revolution was over a century later.
During the revolution France was ruled by effectively a cabal of powerful figures. Napoleon gained favor initially by siding with the revolutionaries against royalist forces. After the revolution many other European powers turned to oppose France, fearful of both the threat the idea of the revolution posed to traditional monarchies and also of the potential spread of chaos outside of the French borders. France, for her part, took up this opposition heartily and began a campaign of defense and then invasion.
Meanwhile, Napoleon rose through the ranks, partly through his skill and charm and partly through his careful political maneuvering. Napoleon went off to command what was to be a fairly disastrous campaign in Egypt and Syria. While there he learned that the fighting in Europe was not going well for France and he returned to Paris, without orders to do so. By the time he returned things had changed however, the military situation had improved while the domestic situation had gotten worse. Despite Napoleon's nominally unsuccessful Egypt campaign he was still very popular with the French public. Napoleon drew together a small alliance of powerful co-conspirators and executed a coup (the Coup of 18 Brumaire) to overthrow the Directory in November of 1799. However, this was not the first coup of the First French Republic. Earlier that same year the Directory had invalidated several elections to the executive board, inserting their own replacements. Two years prior, in 1797, a coup against royalists in the Directory (who had gained the majority via elections) was executed with the aid of the military. Three years prior to that, in 1794, another coup, the Thermidorian reaction, had deposed the Jacobin Club and ended the "Reign of Terror".
To describe the situation in regard to the French government at the time as fluid and occasionally ephemeral is a bit of an understatement, often it was only a few notches from chaos. Napoleon stepped in at a time of weakness and chaos, and additionally set himself up as merely a temporary steward to get the country through the period of warfare and transition. Initially Napoleon's role as "first consul" was relatively popular and not seen as a breach of republican values. And he did not crown himself Emperor until fully 5 years afterward. In the meantime Napoleon consolidated his power at home while winning against an entire coalition of powers on the battlefield, taking and holding several key territorial gains. By the time he crowned himself emperor he had the power and the popularity to do as he wished.