The answer is the germ cells.
Mutation can occur in any type of the cell - either germ cells or somatic cells. Germ cells give rise to the gametes. If the mutation occurs in these cells, the change will be present in gametes, too. This way mutation can be passed on to the next generation. On the other hand, somatic mutations (mutations in the somatic cells) are not passed on to the next generation.