The container is unloaded and held by customs until all fees are paid including any tariffs. If fees and tariffs aren’t paid, customs seizes the merchandise and sells it at an auction. I believe the new buyer then pays the tariff.