The auditory cortex groups the nerve impulses coming from the cochlea into groups of harmonically-related frequencies. For each frequency it looks to see if there are other frequencies that have a precise mathematical relationship to it (i.e. that the frequencies are perfect multiples of each other ). Where it finds correspondences, and where the volumes of the related frequencies seem appropriate, the frequencies are grouped together as harmonics and treated as a single sound with a timbre defined by particular mixture of harmonics, and a pitch defined by the fundamental frequency of its harmonically-related group. When frequencies can be grouped into coherent series, the brain stops hearing the individual frequencies, and presents the whole set as a unitary sound. If one of the frequencies shifts away from a harmonic relationship, it becomes audible again.
It is largely by way of this process that we are able to separate multiple voices speaking at the same time, or multiple instruments playing in a piece of music, and focus on one. Where two people are speaking with the same pitch, their harmonics get mixed up together can cannot be easily separated. In the same way, when the notes that make up a piece of music have harmonic relationships to each other, then we will tend to hear a unity of sound rather than the individual notes. A musical soloist sometimes uses vibrato (rhythmic shifting of pitch) to help them stand out from the rest of the ensemble. As the soloist's note shifts up and down, it is avoids being grouped by the auditory cortex with the rest of the sound.
After the frequency grouping has been determined, the auditory cortex further processes the sound.