Ireland (all or part of it, at various times) was a colony of the English (originally the Anglo-Normans) from the 12th century. From the late middle ages it was a kingdom, under the same monarch as England, but a separate country. In law and in practice, the Irish government was usually subordinate to the English government.
The 17th century saw several wars in England and Ireland: civil wars, colonial wars, and at least one war (c. 1690) that was part of a wider European conflict. Following some of these disruptions, the winners forcibly transferred ownership of large amounts of land to new landlords, and sometimes new tenants: those who had supported the winning side, and/or those who they felt would support them in the future.
The net effect of this was to disenfranchise and alienate the Gaelic/Catholic (Roman Catholic) majority population (aristocracy and common people alike) and some of the older Anglo-Irish families, and establish a new ruling elite of Anglo-Irish (people of English background, and also anglicized Irish) members of the Church of Ireland (Anglican/Episcopalian). This "Protestant Ascendancy" lasted well into the 19th century, with traces still in evidence today.
In addition, there was another transplant population in Ireland, mainly in the north-east (part of the northern province of Ulster): Presbyterians (historically know as Dissenters) from Scotland (also England and even Germany), and other nonconformist Christians (especially Friends (ie Quakers)). They started arriving in the 16th century, and their numbers grew in the 17th. During this period they and the Protestant Ascendancy were not close allies: there were significant differences in background, social class and style of Protestantism.
Both the Catholic majority and the Presbyterians were the victims of discriminatory laws favouring the Church of Ireland. Generally, though, the discrimination against Catholics was worse than that against the nonconformists.
In 1800, Ireland was technically made one with England, Scotland and Wales, in the United Kingdom of Great Britain and Ireland. In some ways, this was a Good Thing for Ireland, as it led to electoral reform, land reform, and the disestablishment of the Church of Ireland and its right to tax the whole population. But the colonial relationship remained, and as freedoms grew without real equality with England and the English, so did Irish nationalism develop and flourish. As the 19th century moved on, independence became inevitable.
But there was a complicating factor. In the late 18th and early 19th century, the Ascendancy and the Presbyterians had begun to become allies on political and nationalistic issues. As Irish nationalism developed (mainly among Catholics), so, in response, did unionism (the desire to preserve the United Kingdom) develop and strengthen among both kinds of Protestant. Several times, the unionists threatened insurrection against their own government in order to stay under that government.
Fast forward to the First World War. The British Parliament had passed an Irish Home Rule bill, but its implementation was delayed because of the war. A small band of Irish Republicans, holding that independence was Ireland's of right and not in England's gift, staged an armed rebellion (the Easter Rising) in 1916, briefly taking over a small part of central Dublin. The government acted harshly, executing several of the rebels, and cracking down hard in general. This led most of the country to side with the rebel cause. It quickly became ungovernable by Britain.
But the unionists still held the north, and they would in turn rebel if Britain cast them loose. To avoid a civil war, the government in late 1921 forced nationalist negotiators to accept partition. The Irish Free State and Northern Ireland were born. Each had its own Parliament; each was to be separate from Great Britain but under the Crown.
But it didn't work out like that. The South altered it's constitution in 1937 severing most of it's links with the UK. It then declared itself a Republic in 1948/49 ending all links.
However, there were other ways in which the arrangement failed, too. Firstly, civil war was not avoided; its focus was just shifted. Instead of being between unionists and nationalists, it turned out to be between those in the Free State who accepted partition and other conditions of the peace treaty, and those who refused to accept it.
Secondly, the northern unionists, suddenly a majority in their new state, discriminated against the nationalists, and in turn the nationalists never fully accepted the legitimacy of the new constitutional arrangements. Some of them, known as republicans, continued a violent campaign against the London and Belfast governments; in turn, the authorities continued to exercise extraordinary powers to fight them. The community was divided. The fact that this division of national identity was roughly along Protestant-Catholic lines only made things worse.
Thirdly, the Boundary Commission which was set up as part of the Treaty to examine a realignment of the Border failed. Instead of returning Fermanagh, and parts of Derry, Armagh and Down to the South, the chairman ruled that parts of the Free State be handed over to the North. The Free State rejected this and there was no realignment. As a result that areas that would have preferred to be in the South were denied that opportunity. This exacerbated the problems mentioned in the previous paragraph.
In the 1960s, the republicans gave up violence and turned either to politics or to retirement. But a new civil rights movement arose, to protest and correct the discrimination against Catholics. This met a hostile and violent response from sections of the Protestant population, including sections of the police force. The Irish Republican Army was revived, in a new and more vicious form. Civil disorder grew. The Belfast government could not cope and was biased. The London government put troops on the streets to keep the factions apart at the end of the 1960s, and abolished the Belfast government (known as Stormont, for the place where it was based) a couple of years later.
The level of violence is now much less than it was in the early 1970s, and Northern Ireland is actually a much safer place than the news makes it seem, but it still has not achieved full and "normal" political and social stability. The gun is still regarded by too many as a means of political expression. Large parts of the population refuse to accept the legitimacy of the political views and sense of national identity of "the other sort."
For most of the century, the North has been more prosperous than the South, but the gap has been closing. The South has become richer; the Troubles have been a drag on the Northern economy in spite of financial support from London. Common membership in the European Union (formerly Community) has also served to lessen differences and remove the customs and excise function of the border.
Another way in which differences are lessening is the religious makeup of the population. Catholics, though still a minority in the North, are now a larger proportion than earlier. In another few decades, it's conceivable that they may hold the majority.