How do issues with energy balance and body weight regulation lead to obesity?

How do issues with energy balance and body weight regulation lead to obesity? What are the physical and psychological issues that influence energy balance? Is this related to a genetic or environmental cause, or both?