While the Conservative and Labour parties are Britain’s largest, several smaller parties are running candidates.

If one party wins more than half of the parliamentary seats, it will form the government, and its leader will become the prime minister.

For decades, such majority governments were by far the most common result. But that has happened only once in the past three elections. The other two produced “hung Parliaments,” with no party strong enough to govern on its own.

In that case, the largest party usually has the first chance to assemble a parliamentary majority and form a government.

It can do so by agreeing to a formal coalition with one or more smaller parties and governing on a joint program, as the Conservatives did with the centrist Liberal Democrats after the 2010 election.

Or it can form a minority government, and seek a looser deal for smaller-party support on critical votes — known as a “confidence and supply” arrangement. The Conservatives struck one of these with a Northern Ireland party, the Democratic Unionists, after the 2017 election.

When the results are known — and if a party clearly comes out on top — the head of that party visits Buckingham Palace to ask the queen for permission to form a new government and become the prime minister.