The luxury tax, otherwise known as the Competitive Balance Tax, is essentially a soft payroll ceiling. The purpose of the tax is to reduce the advantage of large-market teams that can afford to spend more money. Baseball teams in smaller markets (such as the Cleveland Indians, Kansas City Royals and Milwaukee Brewers) can't afford to spend money like the New York Yankees or Los Angeles Dodgers. As a result, the latter teams can buy free agents of higher quality and in higher quantity. The luxury tax forces those teams to incur penalties if their payroll rises above a certain cap.
Upcoming Luxury Tax Thresholds (via MLB.com)
2018: $197 million
2019: $206 million
2020: $208 million
2021: $210 million
Any team that goes over the threshold in its respective year pays a 20% tax on the overage. However, the 20% figure only applies to the first time a team exceeds the cap. If a team passes the threshold in a second consecutive year, it pays a 30% tax on the overage. If that becomes three years in a row, the tax raises to 50%. The tax resets every time a team spends a full season under the luxury tax ceiling.
The penalties get stricter the higher a team spends above the tax threshold. Any team that exceeds the cap by $20-$40 million pays a 12% surtax. A team that goes $40 million over the cap has to pay a 42.5% tax the first year. That figure rises to 45% the following year. In addition, a team that hits the $40 million mark gets its first round draft pick lowered by ten spots the next season. If that pick is in the top six, the team's second round selection is lowered by ten spots instead.
Part of the money paid due to the luxury tax obligations is allocated to player benefits. The rest is distributed among teams that did not pay the cap.