Philosophers and psychologists have long debated the nature of emotions such as happiness. Are they states of supernatural souls, cognitive judgments about goal satisfaction, or perceptions of physiological changes? Advances in neuroscience suggest how brains generate emotions through a combination of cognitive appraisal and bodily perception.
Suppose that something really good happens to you today: you win the lottery, your child gets admitted to Harvard, or someone you've been interested in asks you out. Naturally, you feel happy, but what does this happiness amount to? On the traditional dualist view of a person, you consist of both a body and a soul, and it is the soul that experiences mental states such as happiness. This view has the appealing implication that you can even feel happiness after your body is gone, if your soul continues to exist in a pleasant location such as heaven. Unfortunately, there is no good evidence for the existence of the soul and immortality, so the dualist view of emotions and the mind in general can be dismissed as wishful thinking or motivated inference.
There are currently two main scientific ways of explaining the nature of emotions. According to the cognitive appraisal theory, emotions are judgments about the extent that the current situation meets your goals. Happiness is the evaluation that your goals are being satisfied, as when winning the lottery solves your financial problems and being asked out holds the promise of satisfying your romantic needs. Similarly, sadness is the evaluation that your goals are not being satisfied, and anger is the judgment aimed at whatever is blocking the accomplishment of your goals.