Somatic variants are acquired mutations that occur in individual cells during a person's lifetime and are not inherited. These mutations can result from environmental exposures, such as tobacco smoke or UV radiation, or from errors in DNA replication. Germline variants, on the other hand, are inherited from a parent and are present in every cell of the body. Both types of variants are important in cancer development and progression.