Northern Ireland, which is a piece of the Island of Ireland on the northeast corner, belongs to the UK. Ireland is a separate country.
Ireland used to belong to the UK, but in 1922 gained its independence. At the time, Northern Ireland was included provisionally, but had the right to return to British rule if they chose.
Immediately, Northern Ireland stated its desire to continue as part of the UK, and so it has been ever since.
What makes Northern Ireland different from the rest of the island is that a lot of British had settled there, and built factories and so forth; and the majority of the population of Northern Ireland was British. The UK is officially Church of England (called "Protestant" locally) and the majority of the Southern Irish are Roman Catholic. Thus the British and Irish populations are also referred to as Protestants and Catholics.
Although the majority in Northern Ireland identify themselves as "British" and "Protestant," the Irish minority felt very strongly, and wanted to be part of Ireland.
After many decades of terrorist conflict on both sides, in 1998, agreed to a power-sharing plan in 2007, thus making peace.
Northern Ireland is still part of the UK, but it is pretty much autonomous and has close relations with the Republic of Ireland.