How was the United Kingdom formed?
This took centuries, and a lot of armed struggle was involved. In the 15th century, a Welsh prince, Henry Tudor, became King Henry VII of England. Then his son, King Henry VIII, united England and Wales under one Parliament in 1536. In Scotland a similar thing happened. The King of Scotland inherited the crown of England and Wales in 1603, so he became King James I of England and Wales, and King James VI of Scotland. The Parliaments of England, Wales and Scotland were united a century later in 1707.
The Scottish and Welsh are proud and independent people. In recent years there have been attempts at devolution in the two countries, particularly in Scotland where the Scottish Nationalist Party was very strong for a while. However, in a referendum in 1978 the Welsh rejected devolution and in 1979 the Scots did the same. So it seems that most Welsh and Scottish people are happy to form part of the UK even though they sometimes complain that they are dominated by England, and particularly by London.
The whole of Ireland was united with Great Britain from 1801 up until 1922. In that year the independent Republic of Ireland was formed in the South, while Northern Ireland became part of the United Kingdom of Great Britain and Northern Ireland.
Susan Sheerin, Jonathan Seath, Gillian White: Spotlight on Britain; Oxford University Press, 1985, page 2 f.