There are lots of resources available that can help you learn how to eat properly when you quit smoking so that you will not gain weight. One thing you will probably hear is that exercising seems to help. Exercise helps with the craving, and it also builds muscles and burns extra calories. Do not let a fear of weight gain keep you or someone you love from quitting. There are many different methods that people use to get off cigarettes.
Some people have good success with nicotine gum or with the nicotine patch.
Nicotine is a very powerful drug, so be sure to never smoke while using these products. Other people have success with acupuncture, support groups, or hypnosis. If you're confused about which method is best for you, consult with your healthcare provider. Talk to friends or family members who have quit smoking to see how they did it. Then pick one method and stick with it.