The United States of America is a republic -- not a democracy. Presidential winners are determined by the majority of votes received in the Electoral College. Each state has one electoral vote for each senator and member of the House. This guarantees an automatic level of representation from even the smallest, or least populous states. (Otherwise, New York City, Los Angeles, Chicago, and Houston would decide every election!)
Nowadays, there are only two major political parties -- and a third party candidate who wins votes in the Electoral College is rare indeed. In the past, this has not necessarily been the case. Take a look and see . . .