United Parcel Service said Tuesday that it will lay off about 12,000 workers, with managers and contractors taking the brunt of the cuts.