These people, the electors, comprise the Electoral College, and their votes are then counted in a joint session of Congress.
It takes 270 electoral votes to get a majority of the Electoral College. The total number of electors -- 538 -- cannot change unless there are more lawmakers added on Capitol Hill or a constitutional amendment. But the number of electors allocated to each state can change every 10 years, after the constitutionally mandated Census.
Each state gets at least 3 electors. California, the most populous state, has 53 congressmen and two senators, so they get 55 electoral votes.
Texas, the largest reliably Republican-leaning state, has 36 congressmen and two senators, so they get 38 electoral votes.
Six states -- Alaska, Delaware, Montana, North Dakota, Vermont and Wyoming -- are so small, population-wise, that they only have one congressperson apiece, and the lowest possible three electoral votes. The District of Columbia also gets three electoral votes. Voters in Puerto Rico and other non-state territories get no electoral votes, although they can take part in presidential primaries.
The states are in charge of selecting their own electors.
And a number of states do not require their electors to honor the election results, which has led, occasionally, to the phenomenon known as a "faithless elector."
(By some coincidence, the Supreme Court is right now hearing cases about whether states can penalize electors who vote for someone other than the person chosen by the voters. Ten electors did just that in 2016.)
THANKS TO CNN FOR SOME INFORMATION