The UK is a sovereign state consisting of Great Britain and Northern Ireland. It doesn't have any other names, it's just the United Kingdom (UK). Anyone who uses Great Britain or Britain as a synonym for the UK is incorrect. Great Britain is an island which contains England, Scotland and Wales. It is not a country, it is an ISLAND, that's it. Northern Ireland is situated on the neighboring island of Ireland, which also contains the Republic of Ireland, an independent sovereign state. Great Britain and Ireland make up the British Isles, along with hundreds, if not thousands, of minor islands
While they are part of the country that is the UK, England, Scotland, Wales and Northern Ireland are all countries in their own right
"is there a preference/offense for being called english versus british?"
British is a collective term for inhabitants of the island of Great Britain. Some people will be offended if you called them British, others wouldn't. Personally, I don't mind being called either British or English. To be on the safe side, always call people English or Scottish etc. It just saves any embarrassment on your part. Alternatively, you could just ask what they prefer to be called, most wont be terribly offended if you're clearly confused
"can someone further explain how part of Ireland is part of the UK, and part isn't?"
Between 1801 and 1922, all of Ireland was part of the UK. In 1922, the southern portion of the island seceded to form the Irish Free State, today known as the Republic of Ireland. The reason for the partition of Ireland is a religious one. Northern Ireland is primarily Protestant, as was Great Britain at the time (religion is declining in the UK today), while the rest of Ireland was/is predominantly Roman Catholic. The dispute between the two faiths over the constitutional status of Northern Ireland continues to this day, and has resulted in several violent affairs, most notably the Troubles, which occurred between the 60s and 90s. This really is a shortened version of the whole Irish fiasco and even I don't claim to understand it entirely, I suggest you research it yourself if you want to find out more