The UK is due to leave the European Union (EU) at 23:00 GMT on 31 October 2019. For those not following every twist and turn, this guide covers the basics.
What is Brexit?
Brexit - British exit - refers to the UK leaving the EU.
What is the European Union?
The EU is an economic and political union involving 28 European countries. It allows free trade and free movement of people to live and work in whichever country they choose.
The UK joined in 1973 (when it was known as the European Economic Community). If the UK leaves, it would be the first member state to withdraw from the EU.
Why is the UK leaving?
A public vote - or referendum - was held on Thursday 23 June 2016, to decide whether the UK should leave or remain.
Leave won by 52% to 48%. The referendum turnout was very high at 72%, with more than 30 million people voting - 17.4 million people opting for Brexit.
Why hasn't Brexit happened yet?
Brexit was originally due to happen on 29 March 2019. That was two years after then Prime Minister Theresa May triggered Article 50 - the formal process to leave - and kicked off negotiations. But the Brexit date has been delayed twice.
A deal was agreed in November 2018, but MPs rejected it three times.
Why did Parliament reject Theresa May's Brexit deal?
The main sticking point for many Conservative MPs and the DUP (the government's ally in Parliament) was the backstop.
This was designed to ensure there would be no border posts or barriers between Northern Ireland and the Republic of Ireland after Brexit.
If it had been needed, the backstop would have kept the UK in a close trading relationship with the EU and avoided checks altogether.
But many MPs were critical. They said if the backstop was used, the UK could be trapped in it for years. This would leave the UK stuck in the EU's customs union, preventing the country from striking trade deals with other countries.
Their opposition eventually led to Theresa May's resignation. Boris Johnson took over as PM in July 2019.
On 17 October, Mr Johnson announced that a revised deal had been agreed between the UK and the EU.
What is the new Brexit deal?
The new deal replaces the backstop with new customs arrangements.
Under the plan, the whole of the UK would leave the customs union. At this point, the UK would be free to sign and implement its own trade agreements with countries around the world.
But Northern Ireland would also remain an entry point into the EU's customs zone.
The UK would not apply tariffs to products entering Northern Ireland, as long as they were not destined to be sent across the border into the Republic of Ireland.
Northern Ireland would continue to follow EU regulations for agrifood and industrial goods.
After four years, the Northern Ireland Assembly would have the opportunity to vote on whether Northern Ireland should continue the arrangement.
Much of the Brexit deal remains largely unchanged from the one negotiated by Theresa May. Known as the withdrawal agreement, it includes:
The withdrawal agreement sets out terms for the "divorce" process.
There have also been changes to the political declaration, which sets out plans for the long-term relationship between the UK and the EU. It says the future relationship would be based on a free trade agreement, but there's no guarantee one can be agreed by the end of 2020.
Will the DUP accept the new deal?
The DUP has been in an agreement with the Conservative Party since the 2017 election. In the past, this gave the government a working majority.
However, the DUP says it won't back the new deal because it does not get a veto. It's worried that if Northern Ireland sticks to some EU rules, the union between Northern Ireland and Great Britain will be undermined.
What happens next with Brexit?
MPs were due to vote on the deal at a special Saturday sitting in Parliament on 19 October.
However, before the vote took place, MPs voted for an amendment which withheld approval until legislation implementing it had been passed.
That means that as a deal has now not yet been approved by MPs, Mr Johnson is obliged to seek a delay to Brexit until 31 January.
Mr Johnson will now be required - under the so-called Benn Act - to send a letter to the EU to ask for a Brexit delay. If the EU approves the request, this would push the Brexit date from 31 October 2019 to 31 January 2020.
The prime minister has said he will not "negotiate" a delay but it is unclear what will happen next.
He says he will introduce the legislation needed to implement his deal in Parliament next week.
What about an early election?
In September, Mr Johnson tried to call an early election in the hope of winning more Conservative seats and making it easier to deliver Brexit.
But not enough MPs supported the PM. To trigger an early election at least two-thirds must back the idea.
Opposition MPs say they won't back an election - or call for a vote of no confidence in the PM - until a no-deal Brexit has been blocked or ruled out.
Will a no-deal Brexit cause disruption?
If the UK leaves the customs union and single market on 31 October, then the EU will start carrying out checks on British goods. This could lead to delays at ports, such as Dover. Some fear that this could lead to traffic bottlenecks, disrupting supply routes and damaging the economy.
If the pound falls sharply in response to no deal and there are significant delays at ports, like Dover, it could affect the price and availability of some foods. There are also concerns over potential shortages of medicines.
Mr Johnson has tried to calm such fears by announcing an extra £2.1bn of funding to prepare for a possible no-deal outcome.
Many Brexit supporters say it is hard to accurately predict what will happen or believe any economic disruption will be short-term and minor.
But most economists and business groups believe no deal would lead to economic harm.
For example, the Office for Budget Responsibility - which provides independent analysis of the UK's public finances - believes a no-deal Brexit would cause a UK recession.