When you play a guitar string, you get the main note plus overtones - harmonics. These are multiples of the fundamental frequency. Different instruments emphasize different harmonics, giving each instrument its unique sound.
That's why a violin and a flute playing the same note sound different - they're producing different combinations of harmonics.