I'm going to focus on the music because while music is important in all films, it is even moreso in horror. Films depend on music to help set the mood, and good composers are often able to do so without calling too much attention to themselves. Perhaps it's just me, but music is often able to evoke an understated emotional response, one that sometimes isn't recognizable until after the film has ended. As such, the auditory aspects of a film are often overlooked in favor of the other, more overt, features of the film. Yet any good horror film will rely almost as much on the sound as the visuals to provide the scares.
"Music in horror films is probably more powerful than in any other genre, so it's good for a composer to do them because he can be very influential on the action."That quote is from composer Simon Boswell (found via this excellent article on sound and horror films), notable for his work on many horror films (including several by the infamous Italian director Dario Argento), and I think he's right. Some great examples of how composers really shape the action can be heard in Jaws (courtesy of John Williams) and John Carpenter's Halloween. John Williams' ominous searching cue steadily builds on itself, brilliantly setting the tone for the viewer. Perhaps even more evokative is John Carpenter's score for his seminal slasher flick, Halloween. He describes the process of writing the music for Halloween:
I shot Halloween in the spring of 1978. It was my third feature and my first out-and-out horror film. I had three weeks of pre-production planning, twenty days of principle photography, and then Tommy Lee Wallace spent the rest of the spring and summer cutting the picture, assisted by Charles Bornstein and myself. I screened the final cut minus sound effects and music, for a young executive from 20th Century-Fox (I was interviewing for another possible directing job). She wasn’t scared at all. I then became determined to "save it with the music."And she was right. Just try watching halloween with the sound off and you'll see what I mean. Most of the tension fades away, and while there are certainly some creepy visuals, it's the music that truly cements the scares in the film. The simplistic three-note piano melody that Carpenter composed for the main theme (mp3) is truly haunting. It stays with you, and plays in your head whenever the lights go out.
The scoring sessions took two weeks because that’s all the budget would allow. Halloween was dubbed in late July and I finally saw the picture with an audience in the fall. My plan to "save it with the music" seemed to work. About six months later I ran into the same young executive who had been with 20th Century-Fox (she was now with MGM). Now she too loved the movie and all I had done was add music. But she really was quite justified in her initial reaction.There are some techniques which are more obvious than others, but if they're done well, there's nothing wrong with that. The aformentioned Jaws theme is an excellent example of a long musical build-up that also builds tension in the audience, who becomes convinced that something is going to happen. In Jaws, it does, but many composers have subverted that convention by using the musical build-up as misdirection (i.e. instead of a giant monster, it turns out that the ominous sounds were just caused by the family cat).
Another obvious technique is what Roger Ebert describes as the "boo" moment (or what Carpenter calls the "stingers"), where a sudden sharp noise startles the audience, which is also often used to emphasise a visual surprise. This is sometimes referred to as a "cheap" technique, but I think it's fine if it's used sparingly.
However, even in films that have striking themes and stingers, the music ultimately serves as a medium for subliminal suggestion, setting the mood and subtlety evoking an emotional response. In a horror film, this is of paramount importance, and that's why most great horror films have notable soundtracks. John Carpenter had resolved to "save it with the music," but I don't think there was anything unique about that experience. I think most horror films need to have that musical base to truly be effective.
Update: This post has been featured in the Carnival of Music! Check it out for lots more music goodness.