You should definitely take the time to learn how the election actually works in the United States. Nothing illegal or unprecedented happened. The electoral college decides who wins the election, and their allocation is determined by the number of citizen votes in each state. Each state has a different number of delegates, so picking up wins in key states with a lot of delegates is important. Key states can win you the election, even if you lose the popular vote, as it did for trump. We don’t live in a direct democracy, we live in a representative democracy, aka a republic.