Obesity can be due to various reasons. Main reason is the imbalance between calorie necessary and over consumption, while taking consideration of age, gender, genes and environmental factors. When the food you eat provides more calories than what is needed, the excess will be converted to fat. Primarily, the fat cell increases in size, then it starts to multiply in number. When an obese person reduces his weight the size of the fat cells decrease, but the number of fat cells still remains the same.
Some of the factors that contribute to obesity are genes, lifestyle, uncontrolled emotions, environmental factors, sex, age and pregnancy. Certain medical conditions like depression, polycystic ovarian syndrome, cushing syndrome etc. can also cause obesity.