Our geography narrows down reasonably easily when you read what follows alongside a map. It's a bit ridiculous having so many names though (and I'm British so this is not intended to disparage), but each genuinely does refer to a different political entity.

From the larger to the smaller:

- The "Commonwealth" is a grouping of nations initially based on countries that were part of the old Empire. This is not an exclusive club, though, and countries are free to leave or join as they wish. Over the years there have also been members who were never part of the Empire. Its mostly a loose trading arrangement with some political and sporting overlap.

- The "British Isles" (a name disputed by many in Ireland as it includes the island of Ireland) is the group of islands containing the UK and the island of Ireland. Basically, the whole mass that sits off the top left of Europe (mainly sea borders with France and Norway).

- The "UK" is the "United Kingdom of Great Britain and Northern Ireland", and so comprises the top strip of the island of Ireland plus Great Britain, so the British Isles but excluding the Republic of Ireland part in the lower bulk of the island of Ireland. This grouping is what the UK Parliament represents, with elected members from each one and with devolved powers to their local assemblies in many areas.

- It follows from the above, therefore, that "Great Britain" is the UK minus Northern Ireland. So that's the countries of "England", "Scotland", and "Wales". There are theories about the name Great Britain, some claiming to be fact, but I like to think of it as either being "the greater part of the British Isles" or "greater Brittany" (an area of France that has many political/military contacts over the centuries). It isn't about being "great" in terms of wow look at us.

- Then you've got the aforementioned three 'mainland' UK nations of "England", "Scotland", and "Wales". Whilst being in the UK and controlled by London, they have distinct identities and often legal differences (especially Scotland). They also are often represented individually in various sports such as football or rugby.

- England's capitol city, London, contains a small (and ancient) area within it called the "City of London". It is legally distinct from the rest of London and has many of its own institutions and laws.

---

To answer the main question, the word Brexit implies the exiting of Great Britain however it was actually the UK that left, so that's Great Britain (England, Scotland, and Wales) and Northern Ireland.

This incidentally also reveals one of the major issues of it all - by the UK leaving as a whole, it took Northern Ireland with it. That meant a land border between the UK and the EU for the first time (separating Northern Ireland and the Republic of Ireland).

Given the many decades of rumbling conflict of various degrees of brutality between the factions in Northern Ireland, re-introducing a land border at that point would risk derailing Irish peace. So a large part of the discussions involved a border in the Irish Sea between Britain and Ireland, which gives Northern Ireland a special status within the EU (enhanced compared to the mainland UK).