In America, the people do not vote directly for their president and their vice president. Rather, these positions are selected through a system called the Electoral College.
A college is a group of 538 people who are also known as former electors. Each elector represents one vote in the electoral votes. This implies that, for a winner to emerge, one candidate must have 270 electoral votes.
In the real sense, the general population is not voting directly to elect their president but are casting their votes for electors who will now vote, on their behalf, for the president.
Technically, one can say that electors are party loyalists who pledge to support the candidate who gets the most votes in their state.
Electors are chosen in two processes. First, the state political parties nominate electors, either at party conventions or by committee vote.
The second part of the process is done during the general election. The party that has the most votes in the general election will have its electors represent the state at the electoral college.
So, even if a candidate wins the national popular vote, that does not guarantee the same result in the electoral college.
In 2016, Hilary Clinton had the national popular votes but lost to Donald Trump at the electoral college with 227 votes as against Trump’s 304.
The question is, “can an elector go rogue and cast their ballots for a candidate other than their state’s popular vote winner?” Though rare, YES.
It was reported that in 2016, seven electors cast their ballots for a different candidate from the one that had their state’s popular votes.
Only 32 states and Washington DC have laws intended to control rogue electors. Some provide a financial penalty, while others call for the votes to be canceled, and the elector(s) be replaced.
The electoral college system is a mandate in the US constitution and to change it will require a constitutional amendment. Amending the constitution, especially in the US where different parties control the House and the Senate is not an easy thing to come by.