In the U.K., the Prime Minister is by default the leader of the party that wins the most seats in a general election. Party leaders are nominated by members of Parliament from that party and eventually voted on by party members.