Basically, the Electoral College works as a system for electing the president on a state-by-state basis rather than on a truly national basis.
In this system, each state is given the same number of electoral votes as their state has members of Congress. The smallest states, then, get 3 electoral votes while California will have 55 in the next election. These electoral votes are in almost all cases given to whichever candidate wins the popular vote for the whole state. There is no provision in most states for the votes to be split between the candidates.
Citizens in each state, then, vote for president. Their votes determine who wins the electoral votes from their state. The electoral votes won by each candidate are added up and any candidate who gets a majority of the vote wins. If there is no majority, the House of Representatives decides the election.