Do the abrupt shrieks of a violin set your nerves on edge during a suspenseful scene in a horror flick? Or do you suddenly find tears trickling silently down your face at the sound of a cello in a melodic, melancholic piece of music?

A number of studies show that listening to sad or happy songs can affect someone’s mood to the point of making that person actually feel sadder or happier. What’s more, other studies showed that people tend to listen to music that reflects the mood that they’re in. And according to scientists at the University of Missouri, people can improve their mood just by listening to upbeat music.

But what is music and what aspects of this art form trigger happiness or sadness, anger and aggression, or tranquility and calm?

Generally speaking, music happens when the human voice, musical instruments or computerized programs and digital technology are used to produce regular vibrations that result in musical sounds. Conversely, these same instruments (including the voice), or any object, can be used to make uneven, irregular vibrations. When that happens, those sounds are decidedly unmelodious and reach the ear as noise. (Think a barking dog or train cars screeching to a stop—ouch!)

Research shows that certain types of musical sounds elicit specific physical and emotional responses from people. In addition, the different kinds of instruments used to produce music also play a role in the type of response people have to the tones and tunes produced by this melodic art form. When combined with tempo, rhythm, pitch, melody and harmony, music creates patterns recognized by the human brain. This recognition sparks conscious and unconscious thoughts that shape the way listeners experience these sounds. Furthermore, studies show that even animals and plants react to musical sounds.

“There is a deep connection between music and the mind,” says Galina Mindlin, MD, an assistant clinical professor at Columbia University’s Department of Psychiatry. “You can influence your brain with different music frequencies, rhythms and different combinations of pieces depending on your likes and dislikes.”

Exactly how the brain processes music remains a mystery. But through extensive research, scientists have gained a better understanding about which areas of the brain respond to music and what this entails. For example, researchers observed that babies as young as 2 months old are attracted to pleasant, musical sounds and repelled by discordant unmelodious ones. What’s more, the brain’s pleasure centers become radiant at the end of an orchestra’s particularly melodious composition in the same way they blaze when stimulated by sex, addictive drugs and even certain foods, such as chocolate.

There is more scientific evidence than ever to document the profound influence of music on our physical, psychological and spiritual well-being. “In fact, the rhythms in our brain are organized by the same principles of music,” Mindlin says. “Like scent, music has an instant neurological pathway that circumvents your thinking brain and directly affects your emotional state.”

Perhaps you’ve heard of the “Mozart Effect.” That’s the controversial concept that listening to classical music at an early age helps make children smarter, and that learning a musical instrument also helps the brain develop differently and can improve mathematical ability. Although there is no evidence to support a connection between listening to music as an infant and brain size or school success, the Mozart Effect has been touted as a way to “heal the body, strengthen the mind and unlock the creative spirit.” Mindlin developed a treatment method called brain music therapy, which is based on this principle. She actually records her patients’ brain waves and converts them into individualized musical frequencies that she then uses to treat their insomnia, anxiety or other mood or stress disorders.

But music can be used in other ways to enhance the quality of our lives. There are many stories about kids who use music to relax, build their self-esteem, boost energy levels and feelings of well-being and to avoid binge-eating and boredom. What’s more, when children participate in musical activities, they can drastically improve the quality of their lives well into their adult years.

Increasingly, science has also shown the value of using music therapy to treat many different mental, emotional and physical disorders. As research continues to reveal deep and complex connections between music and the brain, we can anticipate learning even more about why this creative art form holds such a powerful sway over our emotions.