When your Tamagotchi grows up and becomes an adult, it can mate with another Tamagotchi (either a friend or one brought by the match maker) and have a baby. That baby becomes the next generation i.e. 2G. As long as you keep them alive and keep reproducing, the generation number goes up.