The Prime Minister of the United Kingdom is appointed by the monarch as head of Her Majesty’s Government.
The way the Westminster system works is that the monarch must appoint a Prime Minister who is a member of the House of Commons and can most likely form a stable government with the support of that said house. What does this mean? Simply put, the monarch must appoint the leader of the party that has either secured an overall majority in parliament, or has secured the support of another party or individuals through the formation of a coalition.
This opportunity is normally given to the leader of the party that has obtained the most seats in parliament.
This last happened in 2010 when the Conservatives teamed up with the Liberal Democrats. The last time that the UK had a coalition government was during World War Two under the stewardship of Winston Churchill.
Once a Prime Minister is appointed and sworn in, he or she can then appoint various ministers and under secretaries to run the various functions of government. These normally include foreign affairs, education, health, energy, defence and so forth. Cabinet ministers can roughly be thought of as the equivalent of heads of department.
In a usual British setup, there are usually 20 senior ministers and about 100 junior ones. The most senior posts are usually the Home and Foreign secretaries. Unlike some continental governments, the UK does not appoint technocrat ministers and there are always members of the lower house of parliament or Peers in the House of Lords.
The government is answerable to parliament and although members are supposed to tow the party line, there are sometimes back bench revolts. If the government’s back bench votes against it and secures enough support for the opposition, it is called a vote of no confidence and will lead to the resignation of the Prime Minister and the calling of an early election.