A new study published in the American Heart Association (AMA) journal Circulation: Cardiovascular Genetics finds that smoking cigarettes affects the human genome in the form of DNA methylation. 
Affecting 1/3 of Known Human Genes
For the study, researchers analyzed blood samples from nearly 16,000 participants from 16 groups included in the Cohorts for Heart and Aging Research in Genetic Epidemiology (CHARGE) Consortium. One of the groups came from the Framingham Heart Study that researchers have followed-up since 1971.
Compared with lifelong smokers, the researchers found that DNA methylation sites associated with smoking were linked to more than 7,000 genes which account for 1/3 of known human genes.
The team determined that while most of the DNA methylation sites in former smokers returned to levels observed in people who never smoked after about 5 years, some of the sites remained even 30 years after quitting smoking.
Said Roby Joehanes of Hebrew SeniorLife and Harvard Medical School:
“Our study has found compelling evidence that smoking has a long-lasting impact on our molecular machinery, an impact that can last more than 30 years.” 
He went on:
“The encouraging news is that once you stop smoking, the majority of DNA methylation signals return to never-smoker levels after five years, which means your body is trying to heal itself of the harmful impacts of tobacco smoking.”
The team had not associated some of the affected genes with the damage caused by smoking before. Joehanes and his colleagues said it might someday be possible to use affected genes as “markers” to determine who is at risk for smoking-related diseases in the future.
The information might eventually help scientists develop new drugs to treat the damage done by smoking.
Study author Dr. Stephanie London, deputy chief of the epidemiology branch of the U.S. National Institute of Environmental Health Sciences, said:
“We could use this type of data to estimate people’s previous smoking. No one says they smoke when they don’t, but they say they don’t smoke when they do, so we could use these signals to find that out.” 
What is Methylation
HealthierTalk explains methylation this way:
“In simple terms it is a process in which certain chemicals called ‘methyl groups’ are added to various constituents of proteins, DNA and other molecules. These are needed to keep them in good ‘working’ condition.”
In even simpler terms, methylation is an alteration of DNA that can inactivate a gene or alter how it functions. 
Both heart disease and cancer are caused by genetic damage. Some of this genetic damage is hereditary, but the majority is caused by lifestyle and day-to-day living, including smoking.
Quitting Helps, but Doesn’t Wipe the Slate Clean
If you’re a smoker, one of the best things you can do for your health is to quit. However, it doesn’t wipe the slate clean.
Said Dr. Norman Edelman, senior scientific advisor for the American Lung Association, who wasn’t involved in the study:
“Those of us who deal with smoking as a public health problem understand … that anything you look at seems to be affected by smoking. Many cancers, bone disease, lung disease, heart disease, [gastrointestinal] problems — smoking has such a wide array of effects, it’s not especially surprising to hear its epigenetic effects.
The message here is that smoking has an enormous, widespread impact on your genes. Most of it is reversible, but some is not. So if you smoke, you’re going to alter your genetic makeup in a way that’s not totally reversible.” 
 NBC News