Many different sounds have the same pitch - you can play the same melody with a flute or with a clarinet or with a horn. Here, you can hear the same melody played on three computer-generated instruments.
The melodies in these examples share the same sequence of pitches, and have about the same sound level. The property of sounds that is different between them is called 'timbre' - the timbre of the flute is different from that of the clarinet and from that of the horn.
Here are the spectra of the three versions:
Note the large differences between the spectra, as well as the similarities. The sequence of pitches is to a large extent apparent in the line of the fundamental (the lowest red band). However, the number and relative strengths of the higher harmonics vary substantially between the three instruments, resulting in their unique timbre.