Check out the "Read this first" sticky on the front page of this forum - that contains a list of fare types and their corresponding cabins on BA. It also contains details of how you find this on ba.com (which is relatively new functionality - basically, you can find it by clicking/hovering over if your browser permits the flight number's hyperlink when you are in the process of a new booking, or viewing your existing booking in 'Manage My Booking').
They are not the same for every airline. They are often 'similar' across alliances but not necessarily all the same (e.g. P class is First on AA, but is the Premium Economy award class on BA...but F, A, Z are all consistent as First across both BA and AA).
The above advice relates to BA - since I know you've also been active on the BD forum, you can determine your fare class as you book there on the confirmation page where it summarizes your entire fare basis for each leg - it is the first letter (e.g. NOWBABY is an N class booking).