system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:The difference between "president" and "prime minister" and how come certain countries have both.

Why are they some times called prime ministers, and some times president? Is there a real difference to their actual role? And why do countries like Russia and Ukraine have both a president and a prime minister?
gpt
So democratic governments are divided into 3 branches, the legislative (i.e. congress, tasked with writing and passing laws and budgets), the executive (the cabinet and the various governmental agencies like the FBI and FDA, tasked with enforcing the laws) and the judiciary (the Courts, tasked with determining if the laws are constitutional).

The prime minister is the head of the legislative branch, and the president is head the executive branch. Essentially, the prime minister (and congress/senate) determines what the country SHOULD do and how much money it should spend doing it. While the president (along with the governmental agencies under his command) determines HOW they should go about doing what congress ordered. The judges are on the side, trying to decide if the prime minister and the president are allowed to do what they are doing in the first place.

Constitutional Monarchies generally do not have a president, as the executive branch is headed by the king/queen. But as the monarch is purely ceremonial, the usually executive powers devolve to the prime minister.