Our brains interpret sound waves based on three characteristics of the waves: wavelength, amplitude, and complexity. Wavelength accounts for the pitch (what note your hearing), amplitude accounts for dynamics (how loud that note is), and complexity (how waves of a certain type overlap and interact with each other) accounts for timbre (was that a violin or a viola?).
So, why do we have two ears? Close your eyes. If you can hear anything around you, odds are high that you have a good bead on what direction each sound is coming from. If I were to stand beside you now and speak to you whilst your eyes were closed, you could tell me where I was with yourself as a reference point. If I moved about the room, you could tell me in which direction I was moving. That's pretty spiffy if you think about it for a moment. How do we do that?
In the mid-region of your brain, or the mesencephalon, there's an area called the inferior colliculi. This little baby looks kind of like a sports stadium with a dome. The inside of this stadium works like one of those 360 degree movie theaters. The center is you. When your ears pick up sound waves, one ear detects the wave at a different time than the other ear. When the wave is transduced into neural code, that code is processed by the inferior colliculi. Depending on when and how the waves reached each ear, the inferior colliculi gives your brain a position of where the sound came from relative to you. Just in case you're wondering, there's a superior colliculi (in neuroscience speak, "superior" means "above" and "inferior" means "below") right above the inferior colliculi. The superior colliculi handles complex functions like balance, which is why we say that balance is associated with your ears.
There's one instance when our ability to pinpoint location based on audition doesn't work so well. Whenever something is directly in front of us or behind us, any sound waves it emmits will reach both ears simultaneously. When this happens, the inferior colliculi only has one set of code two work with; it can't tell whether the object is in front of you or behind you. You've probably experienced the sensation of walking down the street and someone calling your name out and you not being able to tell where their voice was coming from. What did you do? You stopped and turned at an angle, then listened again. Your reflex was to shift your body so that the sound would no longer hit both ears at once. We're some spiffy monkeys, huh?