xerotolerant is correct that "overtones" is the correct word in this case. Harmonic and overtone can sometimes be used interchangeably, but not in this case.
This is a big topic, but the short answer is the shape of the wave, which is called the "wave form."
We often depict waves as being simple, smooth curves, but they are, in fact, much more complicated. If you digitally record a sound and then zoom in really, really close, you will see that the wave form is very jagged and irregular. This shape is what gives each instrument its unique characteristics, including the levels of the various harmonics.
So, to answer your specific questions:
Does an ideal string vibrating in a vacuum vibrate with harmonics?
Yes and No, the vibrating string will still create a wave, but the wave will over no medium (i.e. air) to travel through.
Are the harmonics caused by the shape of the resonating body? Are they from the materials used?
Yes to both. All of the properties, e.g. the shape, size, material, performance technique, etc., combine to create the unique sound that you hear.