The cabin is the physical part of the plane: economy, premium economy, business, first. Inside each cabin, airlines sell seats in several booking classes at different prices. When the cheaper classes sell out, the price moves up to the next letter, even though the seat is identical. That's most of the reason fares rise as a flight fills.
Some letters are common across airlines: F for first, J and C for business, W for premium economy and Y for full-fare economy. Below Y, each airline sets its own ladder (B, M, H, K, L, Q, T, V and so on), so a Q on one airline isn't the same as a Q on another. The letter is also the first character of the fare basis code.
It matters more than it looks. The booking class often decides how many miles or status points a flight earns, whether the ticket can be upgraded, and what changes cost. If a flight is changed or rebooked, the new booking class is worth a glance if any of that matters to you.
Don't confuse it with what's in the barcode. A boarding pass may print a class letter, but the boarding pass barcode records the cabin, not the fare bought.
BA0117 · London Heathrow to New York JFK · Economy · Booking class K
Where you'll find it
On the e-ticket receipt or booking confirmation as a single letter beside each flight, labelled class, booking class or RBD, and as the first letter of the fare basis code.