In the electoral college each state gets a certain amount of votes. Who becomes president is based off electoral votes not popular votes. The amount of votes each state gets is determined by their population. People in that state vote for a candidate and the candidate who gets the most votes in that state will get that states electoral votes. for example this election Hillary won most of the votes in California therefore California's electoral votes went to Hillary.