The US is a Constitutional Republic.
People vote for a President, not as a direct democracy, but an indirect one. They essentially vote for one elector from each electoral district or constituency. These electors are representatives; as happens in a republic. All electors make the electoral college. Now, for most states, it is winner-takes-all. So, the candidate who wins a state, gets all the electors from that state. These are called the electoral votes. Therefore, even if Hillary got more votes, she got less electoral votes, and thus, Trump is the President-elect.
There is some valid reason for people to cry and feel sad, however, there is no denying the fact that Trump won fair and square.
When Obama won, many people whined. Now that Trump has won, many are whining.