On 18th April 2017 UK Prime Minister Theresa May called for a general election to take place on 8th June 2017.
It is generally understood that in calling for the election, May was hoping to consolidate her position as Prime Minister, with the aim of beginning the Brexit negotiations with EU leaders on a strong footing. May became Prime Minister in July 2016 when she replaced David Cameron as the Conservative Party leader after the UK referendum on EU membership, so until now she had not personally received an electoral mandate to lead the country through a popular vote.
The British electoral system works on a “first past the post” model. For each local constituency, national political parties can put forward one candidate to run for election as the Member of Parliament (MP) for the area (independent candidates are also allowed). On election day, eligible voters can cast a ballot for just one candidate in their constituency, and the candidate with the largest overall number of votes wins the parliamentary seat for that area. There are 650 constituencies in the UK, and if a single party gains 326 seats or more, they are declared the outright winner of the election. In that case, the leader of the winning party requests permission from the Queen to form a new government.
In cases where no single party reaches the threshold of 326 seats, the election results in a “hung Parliament”, where there is no outright majority. This is the case with the current election, in which the Conservative Party has won 318 seats, the Labour Party 262, the Scottish National Party 35, the Liberal Democrats 12, and the Democratic Unionist Party (Northern Ireland) 10, with the remaining 13 seats shared out among other parties.
In a hung Parliament, the leading parties can attempt to form a government by showing that they can achieve a parliamentary majority, either by negotiating a formal coalition with other parties (this was the outcome of the 2010 election, when the Conservatives under David Cameron formed a coalition with the Liberal Democrats in order to defeat the incumbent Labour Party), or by relying on informal confidence and supply agreements with other parties, without attempting a formal coalition. (NB: To "command confidence" in Parliament, the governing party does not necessarily have to have the positive support of a majority of MPs, but they do have to prevent a majority of MPs from opposing them.)
During these negotiations, the incumbent party (in this case the Conservative Party) remains in office, and they have the first opportunity to try and form a government, which is done by requesting formal permission from the Queen. If the incumbent party is unable to secure a parliamentary majority but the leader of the opposition is, the current Prime Minister must resign and the opposition leader becomes the new PM, and can then go on to request permission to form a government.
The negotiations over which party can form a new government can take several days. The new Parliament is currently scheduled to meet for the first time on Tuesday 13th June, and the State Opening of Parliament is set for Monday 19th June. On that day, the Queen is scheduled to give a Speech outlining the list of laws that the government hopes to pass through Parliament in the coming year. If it looks like the governing party will be defeated on the topics they intend to raise in the Queen’s Speech, the Prime Minister may hand the party leadership over to a colleague in the hope that they can win a confidence vote from Parliament, in order to remain in power. If not, the Prime Minister may resign and hand over power to the leader of the opposition (in this case, Jeremy Corbyn, leader of the Labour Party), who can attempt to form a minority government. However, the party would likely want to call a new general election in order to gain an overall majority in Parliament.