It isn't a democracy in the sense that most people here or indeed most people throughout the western world think of democracy (majority rules). It isn't the original Greek style of direct democracy where people voted on initiatives and whatever the majority decided on that was what they did. It is not a democracy in the sense that whichever candidate gets the most (or majority of) votes becomes the president.
This is the very issue people don't understand, and why they get angry and sarcastically say "is this how a democracy is supposed to work" when their candidate loses. Because they simply don't understand the difference between democracies and republics. There is a difference.
The United States was not designed to be a democracy. It was never designed to hand power over to an angry mob. The popular vote has zero to do with an election, as it should be.
In a true democracy (majority rules), minorities have no voice. Ever. It is a mathematical impossibility. The electoral college was designed to prevent the majority from tyrannizing the minority.
For example, this is every state in the Union that has a SMALLER population than that of a COUNTY (L.A. County):
In a true democracy, California and New York would determine every election, and no one from any other state would ever matter again. Is that fair?
This is why our founding fathers designed the electoral college:
So that one or two states (consisting of a big, large, angry mob) couldn't dictate the fate of the entire nation.