Is the United States a democracy or a republic? I sometimes read articles that strongly proclaim that it is a republic, not a democracy. However, the two terms are not exclusive to each other. Democracies started in ancient Greek city-states. Those political entities had small populations, so it was possible for their men to directly participate in governmental decision-making. The US is far too large for direct participation by its citizens, so its people are represented by elected representatives. Therefore, the U.S. is technically a federal republic.
Baron de Montesquieu's The Spirit of the Laws (1748) strongly influenced the Founding Fathers. The idea is that no one branch of the government should have too much power at its disposal because it may become tyrannical. Therefore, the US government was created with three discrete branches: the legislative, the executive, and the judicial. The Constitution has "checks and balances" which are designed to keep any one branch from becoming too powerful. For example, the US Congress passes bills which become laws only after the president signs them. The president can veto bills, but the Congress can overturn presidential vetoes with a two/thirds majority. The Supreme Court can declare laws unconstitutional.
After the Constitution was written in 1787, it had to be ratified before it could come into effect. Those who opposed it were known as Anti-Federalists while supporters of the Constitution were called Federalists. Alexander Hamilton, James Madison, and John Jay wrote The Federalist to convince Anti-Federalists to support the Constitution. The Anti-Federalists agreed after they were promised a Bill of Rights.