Not sure of it all, but what I do know - it sucks!
A foreign-flagged ship cannot move between two US ports without an intervening foreign port - only US-flagged ships can do that. Lots of other conditions, not all of them bad (safety, sea-keeping, security, etc.) but a lot of restrictions for both US and foreign operations. Check wikipedia, it should help.