Super basic/unrealistic example but:
Let's say you run a hedge fund in New York. You make 50% a year in investing profit and don't want to pay tax.
Well you're a hedge fund so you might argue you want to make sure you preserve capital at all costs. You therefore might want to insure a large portion of your profit each year in case the market swings against you. Insurance costs money so now a huge chunk of your profit is getting sent to a specialist financial asset insurance company.
You incidentally also open and own this insurance company and are basically its only customer. It's also based in the Cayman's with it's very low (zero) corporate tax rate. So now you have a thriving, low tax insurance business charging huge margins to its one customer and quickly sucking your hedge fund profits off shore out of your hedge fund.
Insurance businesses also do a thriving business investing all these premiums they get to make even more than just their insurance margin. Well, you know of at least one excellent investment: a thriving hedge fund in New York. The insurance company can now thus invest into your fund, swelling its assets and avoiding certain types of potential tax, sit on it for however long you want, invest it elsewhere etc etc.
This is a toy example and the reality is a lot more complex and shifting as certain loopholes appear and are closed but is a super basic flow for the style of setup of how offshoring can help people and companies avoid tax.