They are marketing terms for the different processors that Apple puts in their computers. The "G" stands for "Generation" technically. So G3 is generation 3, etc. However these names are somewhat vague and are for marketing purposes only (they don't actually refer to the specific chip. The original G5 chip was actually the IBM PPC 970, which Apple code-named G5). Usually Apple doesn't change the "generation" unless there is a big advancement in the processor itself, like from G3->G4, and G4->G5.