At election day, each state votes separately. The majority in each state gets all the electors of that state (with two exceptions). Each state has a number of electors loosely depending on the population of the state. However, it's not fair because say one elector in Iowa represents much fewer people than one elector in California. On top of that, this system strenghtens the bipartism of the US, because in order to get electors you need to be the first political force somewhere, instead of getting say 10% everywhere like a minor party could easily acheive.
Electoral College:
When you vote, the state that has a certain number of electors(or votes for president). To win this Votes, you must have the MAJORITY vote in that state. The votes in that states are proprotional to it's population(Or also equal to the amount of representatives each state has, they use the same number for both), excepting that all states have a minimum of 3 votes, and DC gets 3 votes even though it falls under no other category and is a special administration region.
Once you win a state, you get the votes. The person who has the most votes then wins president(which amounts to something like 216 I believe) Due to this system, Independent presidents almost never get elected, unless they are really famous (has happened in the past, not so much now).
Now, for small parties, they can(and most times do) occupy state legislators, and sometimes, national legislature, but they cannot take presidential election due to the bias towards 2 party system.
This whole system causes problems though because certain states(Like Florida, Ohio), are big votes(29,20 respectively) and depending on the candidates, can actively make or break the president. My state(Florida) is a purple state, meaning we went Bush twice, but then switch to Obama for 2 sections. But, even though the state is "purple" it's really more like this. North Florida is SOLID BLUE while South Florida is SOLID RED(rep, dem) and the center is pretty mixed.
http://www.ehdp.com/vitalnet/reps.htmAs you can see, there's 3/4 "big states" they are Cali, NY,Texas, Florida. Every election it's almost always Dem: Cali, NY Rep: Texas Swing: Florida. If you win those 4 states, you have practically won the presidency.