The difference is the diameter of the tube. You can NOT use them interchangeably. The ballast has to be rated to the type of tube installed. It also has to be rated to size of the tube. They come in lengths from 2 feet to 8 feet.
T12 is 12/8 or 1.5 diameter
T8 is 8/8 or 1 inch diameter
T5 is 5/8 inch diameter.