I'll likely get some of this wrong, but it should be there or thereabouts:-
1. The EU needs to maintain the integrity of its internal Common Market. This necessitates "hard" borders with countries outside of that Common Market.
2. The EU, the Republic of Ireland and the UK were signatories to the Good Friday Agreement, this gives them all a say in anything that jeopardises it.
3. The EU, the Republic of Ireland and the UK all agreed that, as part of the UK's leaving the EU, a hard border was to be avoided.
4. Leave aside concerns about terrorism and ~50% of the Republic's exports are to the UK. Of the remainder the majority go to the EU, and the majority of those go via the UK.
5. Each of the 27 EU countries has to agree to the Brexit deal, in effect this gives the Republic a veto.
To resolve this "need a hard border but can't have one" problem a backstop was agreed upon. Essentially this says that Northern Ireland will stay in the Customs Union. However the Democratic Unionist Party (the DUP) perceives this to be a separation of Northern Ireland from the rest of the UK, which they abhor. And Theresa May's Conservative Party is dependent on the DUP to maintain their majority in the House Of Commons. To add yet more complexity to it the EU require the backstop to be legally binding, and it will only be lifted when such "technological solutions", as promised in such an offhand fashion by senior Brexit leaders, come to fruition.
Of course those same senior Brexit leaders reject the idea of a backstop out of hand, believing that it means, essentially, that the UK will remain in the customs union in perpetuity.
tldr it's a mess.