Napoleon came to power through a military coup in 1799, which is known as the Coup of 18 Brumaire. (The French Revolution had redone the calendar and renamed months; 18 Brumaire would equate to November 9 on standard calendars.)
Here's a bit more detail about Napoleon's rise to power. The French Revolution had involved much chaos and turmoil in France, and by the time Napoleon stepped into the picture, there was a desire for law and order and stability. He brought that as a military leader who was not afraid to fire "a whiff of grapeshot" (as one historian termed it) on royalist opponents in order to control and defeat them. ("Grapeshot" was Napoleon's use of cannons like shotguns to fire shrapnel at those opposing his troops.) By the time of that event, Napoleon had already established his military reputation against the British in the Battle of Toulon.
The Directory was the 5-man committee that led France in the later stages of the Revolution. But the Directory was ineffective and weak, and Napoleon was showing himself to be strong and effective in battles for France. Napoleon conspired to plan a military coup, with the cooperation of two Directory members, Emmanuel-Joseph Sieyes and Pierre Roger Ducos. But before long, Napoleon positioned himself to be solely in charge of French government.