In many countries most are elected without ever having the majority. The system is called first past the post. The person with the most votes wins. In the US two parties get most of the votes but if a third or fourth party existed with support a president would never get 50%.
Not everyone chooses to vote or is legally able to. The winner is choosen from the available votes that have been cast.