The Electoral College is the actual system by which the President of the United States is elected. The President is not actually elected directly by the voters; rather, there are 538 electors, chosen to represent each state based on the number of Representatives and Senators that state has in Congress. This system was defined by the Constitution, and created primarily because it offered a compromise between electing the President by the legislature as in a parliamentary system, and electing the President directly. Many of the Founding Fathers were uncomfortable with the idea of giving the people that much direct power, and wanted there to be some sort of filtering mechanism; but others felt that allowing the legislature to elect the President would give them too much power, so a compromise was struck.
Each state can choose how their electors will cast votes for the President. Most states are "winner-takes-all", meaning that whoever wins the popular vote in that state will win all the electors of that state. However, a few states allocate their electors proportionally. Strictly speaking, the Constitution always allows electors to change their minds and vote for a candidate other than the one they pledged to based on the state's rules (called a "faithless elector"), but this rarely happens, and it is actually illegal in many states.
Because of this convoluted system, voters are not represented equally across the United States. By the way electors are allocated, voters in small states such as Delaware and Wyoming and voters in "swing states" such as Ohio and Florida that regularly switch which party they vote for have substantially more influence on the election than voters in large, non-swing states such as California and Texas. Many people consider that unfair and undemocratic. But removing this system would require a Constitutional Amendment, which is unlikely to happen any time soon.