There are several factors that contribute to weight gain. I would say, lack of exercise is the main reason for weight gain. I have seen lots of people eating heavy fatty foods but still remain lean. The reason being they are hard workers. They work out every day or their routine comprises of lots of exercises.
From my personal experience, I have seen people with fat body structure not because they eat a lot but because they don't spend the energy they gain by eating.
A proper digestive system and bowel system is also important for people to maintain a healthy body. If these two are not good, food consumed by a person gets deposited in the body in the form of fat and gradually increases the body weight and size. There are also no straightforward ways to get rid of them easily.
Walking and jogging cannot be the only way to reduce weight. A person will also not need gym to reduce their weight if they plan their food well. Not just food but they should also be able to do exercises regularly as part of their rotine.