Close your eyes.
Are they closed?
Now take a few moments and play through that Jaws music in your head. How's that feel? Composer John Williams' score for Jaws is one of the most recognizable pieces of music in the entire world. Just a few seconds of the iconic "duun-dun, dun-dun, duun-duun, dun-dun-dun-dun-dun-dun-dun" is enough to strike fear into the hearts of beachgoers the world over. Who knew two little notes could be so terrifying?
It was Williams who had the idea of "characterizing the shark musically with [this] low, thumping […] bass" (almost a mirror image of the unforgettable shrieking violins from Hitchcock's Psycho), "some kind of driving thing [that] might indicate the mindless attack of the shark. It's all instinct. It's an unstoppable thing; you can't fight it off […]" (source). This stroke of genius is an integral part of Jaws' success and legacy. Stephen Spielberg himself admitted, "The score was clearly responsible for half the success of that movie" (source).
The music plays an active role in tricking, delighting, and terrorizing the audience. In the first part of the film, for instance, the audience is conditioned to expect the shark when the music is heard. When the shark isn't there (including the scene with the fake shark fin, you'll notice), there's no music. Then later, when the shark surprises the crew of the Orca without any musical warning, it's that much more startling for the audience.
When the crew of the Orca is hot on the trail of the shark, the music changes. It's now a thrilling, major-key Raiders of the Lost Ark-y (same composer) type of music. It reminds us that, in the midst of this terrible storyline, there's an element of fun and excitement to the chase—that is, before things turn deadly. It's a bunch of buddies out for adventure, and the music reinforces that mood.
Oh, and here's part of the score that's rarely heard: check it out.