Mutation is present when the DNA is damaged or changed that leads to the alteration of the genes. It can occur in the replication process. Mutations occur randomly according to their effects. Mutations can occur spontaneously or induced by changes in the environment. But not all mutations are direct responce from these factors. Alteration of amino acids leads to mutations but it is not considered as intentional. Mutations are neutral in effect.
Answer - Mutations occur randomly through changes in DNA.