Genes can change or mutate, although this happens only rarely. A mutation is a permanent change in DNA.
Given our trillions of cells, some mutation is occurring all the time. While certain mutations are harmful, in many cases there is no effect on traits. Some mutations are even beneficial. Only mutations in sperm or egg can be passed from parent to child.
Our bodies can sometimes recognize and destroy cells with harmful mutations, but not always. This is how cancer starts. In general, the genome (all the DNA in your body) is quite stable, and the genetic makeup we are born with remains throughout our lives. It is this stability that makes genetic testing a little different from other medical testing. For example, your cholesterol level or your blood count may change with time, but your genes do not change.