As I understand it:
Full title: "The United Kingdom of Great Britain and Northern Ireland", which implies that Northern Ireland is part of the UK, but not of Great Britain.
There are other anomalies, though. The Isle of Man, which lies between the mainland and Northern Ireland, and the Channel Isles, lying just off the northern coast of France, are not part of the UK but self governing "British Crown Dependencies" though for nationality and foreign policy purposes they are treated as part of the UK.
So, strictly speaking, Great Britain comprises the three countries of England, Scotland (which has always had its own legal system, and now has its own Parliament giving it autonomy over much of its own affairs) and Wales (uses the English legal system, but now with its own Welsh Assembly giving a markedly lesser degree of autonomy than Scotland).
The UK comprises Great Britain (England, Scotland and Wales) plus Northern Ireland, which has its own Assembly known as "Stormont" with powers similar to the Scottish Parliament, but which has in the past run into difficulties * because of Irish Nationalist v Loyalist and closely allied Roman Catholic v Protestant differences. NI has in the past, and may in the future, be subject to direct rule from the mainland. I hope that makes it all crystal clear; there will be a short test tomorrow

Andy
* I am being as objective as I can in these remarks about NI; I don't want to stir up any controversy on the subject, and hope there won't be any on this board.