Complex sentence: Some countries charge a departure tax (under various names) only when a person is leaving by air, and can be charged at the airport to those about to catch a flight, or the tax could be prepaid and included in the airline ticket price.
Split into simpler sentences: Some countries charge a departure tax only when a person is leaving by air. Various rules apply to the payment of the tax, including payment at the airport to those about to catch a flight, or by some prepayment method, or it may be charged to the airlines and included in the airline ticket price.