Summarize what electoral college does in USA presidential election

Each states appoints electors based on methods by their legislature. 
Number of electors from each state are same as number of representatives from that state.
Candidate needs 270 electoral votes out of 538 to win presidential election.
All electors from state cast each of their vote to whoever received most votes in that state.
Maine and Nebraska can split their electoral votes based on whoever wins their district.
If no candidate gets 270 votes or higher then House of Representatives meets to elect President and Vice President.