Generating Emotions

From where do emotions generate? Why do we feel differently at different points of time?