The way the body turns food into energy or fat storage is through metabolism. People bodies respond differently to the food they eat and this is, at least in part, programmed by their bodies. Being programmed refers to genetics. For some people metabolism is very high so their food rapidly turns into energy and is burned.
For others whose metabolism is more sluggish, the food turns to fat quicker. Even though genetics can play a role, what it basically comes down to is what one eats and how active they are. Having said that, please understand that a person can change how efficient their metabolism and metabolic rates (how fast the body burns calories) perform.
If a person goes on a crash diet for instance, they are lowering their metabolic rate down to half of its speed capability. However, if that same person instead did some aerobic exercise, their metabolic rate can increase by tenfold, leaving it raised for a lengthy period of time (up to 15 hours).
Also, if people simply change the types and combinations of food that they eat this will serve to reprogram their metabolic rate as well, which will help them to burn fat much more quickly.
This is a win-win situation because when a person has a lesser amount of fat and a higher amount of lean tissue, calories burn off of them simply by keeping their bodies alive and ticking. When metabolic rates are increased, a body that was once a fat producer will become a fat burner and this is what people want.