The Customs Union, what is it?

i got help from this website, so to make this more clear, go to this website

A customs union is a trade deal between particular countries in the EU. Leaving it would result us having our laws on trade, but at the same time we will have to pay for particular trades.The PM is currently trying to stay in the Customs Union but leave the EU. Is this a good idea?