So this can get kind of nebulous as political terms can mean different things to different peoples. As a rule, historical use (and even some modern use) a Republic is a Representative Government where as Democracy was Pure/Direct Democracy (Again, hazy as Switzerland is a Direct Democracy but they also have Representative Democracy too. Generally, historical use of the word meant the people were the sole legal decision makers through popular legislation. The Founding Fathers understood Democracy as equivalent of Mob Rule and feared it as much as they feared Tyranny).
The earliest stages of classical Greek Democracy and Roman Government were revived by the works of philosophers that contributed to the Enlightenment Age (generally from 1715-1789). John Locke was probably the most influencial thinker on the American people, as the Bill of Rights largely reflects Locke's ideas of Natural Rights (i.e. there are some human rights that no law can legislate against such as the right to your own opinions). These would form the basis of most of his influential work as well as Jean-Jacques Rousseau, and Voltaire (these three were quite influential in the formation of the United States). The major Tenants were Representation, Consent of the Governed, Liberty, and Reason.
This isn't to say that it was entirely pro-Representative Democracy. Voltaire absolutely hated Democracy as a whole, and believed that Enlightened Monarchs were perfectly capable of instituting reforms and a few actually tried (Catherine the Great in Russia, Frederick the Great in Prussia, and Joseph II of Austria (who was apparently, not Great)) to varying degrees of success.
Over in the then colonies of England, the Americans were insatiable for these ideas and got into a bit of a squabble with England over having to pay taxes on Tea when they didn't have a leader in parliament (and didn't want one, cause then they would have taxes on Tea). So they threw the Tea into Boston Harbor to which England decided to punish them with restrictions on rights, which they protested, which was then restricted, so they rioted, so England sent in the troops, which was disliked and then the troops decided to take the muskets of some rural frontier towns in Western Massachusetts so they Colonists said, "Of course you know, this means war." They then proceeded to fight a war against a major world power, kicked the British out of America (accept for Canada), created a new government, wrote a bunch of laws that were declared the supreme laws and basically amounted to "No Government will ever do what the British did to us" and would procede to put a Starbucks on every corner to remind those Tea Drinking Brits how much we now hate the stuff. Also the French Revolution happened and the Enlightenment ended.
Next up was the Romantic era, which rejected the previous emphasis on Reason and favored Emotions. This is where the Democratic Party was born and dominated much of American Politics (Every President between Jackson and Lincoln was a Democrat). As the name implied the Democrats wanted more Direct Democracy in the United States and it's biggest success was suffrage to White Men who did not own land. It was more popular in the South, which like all good Romantic era people, were put off by the industrial Revolution in the North and favored more traditional power structures such as landowners controlling the people who labored under them and I think you know where this is going... Lincoln would actually give a speech about how evil Democracy was in the United States.
Since then there were other reforms including letting Black People vote and not be property, and then letting Women Vote... and Direct Election of Senators. Again, given America's govenrment structure, these changes didn't fundamentally change it from a Represetative Democracy ("America is a Republic, not a Democracy" -Every Majority opposed to popular Minority Legislation Ever."). But fundamentally, Modern Democracy still is largely Representative and still attributable to the Enlightenment with Democratic reforms attributed to Romanticism... along with a whole lot of crazy German Ideas, but let's talk about those elsewhere.