You're confusing the cabin flown with the booking class. Cabin flown is generally First (F), Business (C or J, depending on the airline), or Economy (Y). In other words, it's the actual cabin you are physically sitting in on the flight.
The booking class is generally airline-specific and an indicator of which type of fare you purchased. An X fare might be a deep discount Economy ticket, while Y and B are generally full-fare Economy. J or C are generally full fare Business, while F is full fare First. Different fare classes within the same cabin flown will have different prices and different restrictions on things like changes, refunds, and advance purchase requirements.
Here's a
Wikipedia article and a list of all
United Airlines (just to pick one) booking codes.