How does music affect our moods?

We all listen to music to feel some type of mood, but how does it affect us?