Using the 12AX7 as an example, the 12 is the approximate filament voltage.
All AX7 tubes share similar characteristics, of which there are about 20: pinout, base size, gain, plate volts, etc.
The letters on the end indicate different versions of the tube. A thru F are modifications such as an change in maximum plate voltage, usually you can substitute a higher letter for a lower, but not the other way.
The other letters like the W signify some special characteristic such as a special base material or the shape of the tube.