Let’s keep this as simple as possible.
The first principle that needs to be understood is that when our founding fathers were setting the shape of this country there was great concern that states maintain their rights and equal representation. So two houses of congress were formed. The House of Representatives which is comprised of members proportionate to the population of each state. And the upper body, the Senate, which has 2 senators from each state regardless of population. This was to protect the rights of smaller states. This is a long-standing tradition of protecting the rights of the underdog in this country.
The electoral college functions in much the same way. By way of example suppose we hypothesize with only 4 states. Suppose California had a population of 4 million and received 4 electoral college votes. Florida has a population of 3 million and receives 3 electoral votes. Washington receives 2 votes for it’s 2 million and Maine receives 1 vote for its 1 million.
Now suppose in California 70% of the population love and vote for Hillary. That’s 2.8 Million votes for Hillary and 1.2 Million for Trump.
Then the other 3 states vote solidly for Trump at 60% for Trump. That would be 3.6 Million votes for Trump and 2.4 Million for Hillary. So the interests of 3 of 4 states would solidly be in favor of Trump and the electoral vote would be 6 for Trump and 4 for Hillary.
But if we used pure popular vote it would be 5.2 million for Hillary and 4.8 Million for Trump and Hillary would win. Now you may think Hillary should win in this scenario because she received the most votes, but if she won the will of 3 of 4 states would be disregarded for the sake of one state simply because of its population advantage. So the Electoral college is the best solution for having a measure of influence based on population size while maintaining appropriate rights and influence for each individual state.
If you are on the losing side of this race you may not like it, but this system is vastly superior to letting highly populous states have all the decision-making ability for every other state.
Note: the actual way electoral college voters are distributed are by the number of federal congresspeople in each state. So Washington State has 10 representatives (based on population) and 2 senators so 12 total Electoral College votes.