Prime Minister Theresa May has said she will trigger Article 50 by the end of this month - beginning formal negotiations on Brexit. Here's a guide.
Article 50 is a plan for any country that wishes to exit the EU. It was created as part of the Treaty of Lisbon - an agreement signed up to by all EU states which became law in 2009. Before that treaty, there was no formal mechanism for a country to leave the EU.
It's pretty short - just five paragraphs - which spell out that any EU member state may decide to quit the EU, that it must notify the European Council and negotiate its withdrawal with the EU, that there are two years to reach an agreement - unless everyone agrees to extend it - and that the exiting state cannot take part in EU internal discussions about its departure.
It says any exit deal must be approved by a "qualified majority" (72% of the remaining 27 EU states, representing 65% of the population) but must also get the backing of MEPs. The fifth paragraph raises the possibility of a state wanting to rejoin the EU having left it - that will be considered under Article 49.
It was written by the Scottish cross-bench peer Lord Kerr of Kinlochard. He has said he thought it would be most likely used in the event of a coup in a member state and had never imagined it being used for Brexit. The full text can be found here.
The UK, having voted to leave the European Union in last year's referendum, can decide at what point it formally notifies the European Council.
Prime Minister Theresa May first announced her plan to do so by the end of March 2017 in October last year, having argued that she did not want to rush into the withdrawal process before UK objectives had been agreed.
The government's plan to do so by acting alone using its "royal prerogative" was thrown out by the Supreme Court following a legal challenge, so it had to introduce a bill for Parliament to vote on. That passed the Commons but was amended by the Lords. It is expected that the bill will become law later today or tomorrow.
This is not entirely clear. The UK says a trade deal should be part of negotiations - EU representatives have suggested the withdrawal agreement and a trade deal should be handled separately.
The UK has said it wants an "early agreement" to guarantee the rights of EU citizens living in the UK and those of British nationals living abroad.
Other issues which are likely to be discussed are things like cross-border security arrangements, the European Arrest Warrant, moving EU agencies which have their headquarters in the UK and the UK's contribution to pensions of EU civil servants - part of a wider "divorce bill" which some reports have suggested could run to £50bn.
A European Commission spokesperson has told the BBC that it does not comment or speculate on the specific areas that will be covered in the negotiations, which will only start after Article 50 is triggered.
The European Commission - the EU's civil service - has created a task force headed by Michel Barnier, who will be in charge of conducting the negotiations with the UK.
On the UK side, the overall responsibility for Brexit negotiations resides with the prime minister, who is supported by the Department for Exiting the European Union led by David Davis.
The time-frame allowed in Article 50 is two years - and this can only be extended by unanimous agreement from all EU countries.
But can a deal be done in two years? Ministers have publicly insisted it can - but others believe it could take a decade.
Former cabinet secretary Sir Gus O'Donnell predicted it would take "at least five years" and Remain-backing former Labour minister and European commissioner Lord Mandelson predicted that "between five and 10 years" was the most likely timescale.
If no agreement is reached in two years, and no extension is agreed, the UK automatically leaves the EU and all existing agreements - including access to the single market - would cease to apply to the UK. In this case, it is assumed UK trade relations with the EU would be governed by World Trade Organisation rules.
Some ministers have suggested there could be a transitional period once the UK leaves the EU, to avoid a "cliff edge" and phase-in new arrangements.
While Article 50 states that any deal will need the "consent of the European Parliament" - it doesn't say anything about whether the parliament of the departing state should have a say too. This prompted some criticism from UK MPs that MEPs would be better informed than those in the UK's own Parliament.
After initially appearing to resist calls for Parliament to vote on the final deal, the prime minister said in January that both the Commons and Lords would get one. The UK Parliament will also scrutinise the government's work on Brexit through parliamentary debates, select committee work, and votes on proposed legislation.
In its White Paper on Brexit, the government said that parliament would have "a critical role" and that "ministers will continue to provide regular updates to Parliament and the government will continue to ensure that there is ample opportunity for both Houses to debate the key issues arising from EU exit".
As Article 50 has never been put to the test before, it is difficult to say as it is not explicitly stated in the article itself. But the man who wrote it, Lord Kerr, thinks it could. He told the BBC in November 2016: "It is not irrevocable. You can change your mind while the process is going on. During that period, if a country were to decide actually we don't want to leave after all, everybody would be very cross about it being a waste of time.
"They might try to extract a political price but legally they couldn't insist that you leave."
And the President of Luxembourg, Xavier Bettel has suggested it could be reversed: "Maybe during the procedure of divorce they will say 'we love you that much that we are not able to conclude that divorce'," he told the Independent.
It will remain a member of the EU, will still be in the single market and subject to all the EU laws and rules, including the freedom of movement. But the UK has given up its rotating presidency of the European Council - which was scheduled for the second half of 2017 - to concentrate on Brexit negotiations.
Legally, there is nothing to prevent the UK from taking part in adopting EU acts that are unrelated to Brexit during the negotiation period. However, the UK cannot participate in the decisions taken by the council concerning Brexit negotiations.
No, while the UK is still part of the European Union, it cannot independently negotiate any international trade agreements with non-EU countries, without violating EU treaties. But there could still be some general discussions about trade.
International Trade Secretary Liam Fox has said that "while we remain inside the European Union, we are bound by its rules not to negotiate any new trade agreement", but the UK would still be able "to discuss the impediments that we might wish to eliminate ahead of agreements that we might reach with other countries when we leave".
However, potential trading partners will be likely want to know the exact terms of Britain's withdrawal from the EU and the European single market.
As one US trade representative put it: "As a practical matter, it is not possible to meaningfully advance separate trade and investment negotiations with the UK until some of the basic issues around the future EU-UK relationship have been worked out."