Since High School, I've disliked the concept behind the Electoral College being the final say for Presidency. After asking my teacher whether the electoral college had ever overruled the popular vote, he told the class about the only election, up to that time, where it had happened. Now, to think it's happened twice in the last 20 years, is sad. We are creating a generation that will have no belief in voting if this happens again during their lifetime.
Your teacher was wrong. It's happened four times, plus one that was decided by Congress.
1824: John Quincy Adams (Incumbent) vs Andrew Jackson. Adams got the most popular votes (not taken in all states at the time) and also got the most electoral votes (99). Unfortunately for him, it took 131 electoral votes to be elected President at the time, so the election went to the House. Jackson won. BTW, both were Democratic-Republicans, the only active party at the time, but it split four ways after this election. Adams later co-founded the National Republicans, aka the Whig Party.
1876: Rutherford Hayes (R) lost the popular vote to Samuel Tilden (D) but won the Electoral College by one vote. Hayes did not seek reelection in 1880.
1888: Grover Cleveland (D, incumbent) won the popular vote, but lost the Electoral College to Benjamin Harrison (R). He would reverse the results in 1892, becoming the only President to serve two non-consecutive terms.
2000: Al Gore (D) won the popular vote but lost the Electoral College to GW Bush (R), in the big Florida mess. Had Gore won his home state of Tennessee, Florida would have been moot.
2016: Hillary Clintion (D) won the popular vote over Donald Trump (R), thanks to huge majorities in California and New York. But because she was guaranteed to win those states anyway, it made no difference. Trump won where it counts, in the Electoral College.