So Why Don't Different Instruments Sound Alike When Playing the Same Notes?

I'm no musician. Heck, I have a barely functional sense of rhythm and am the only person I know to have actually failed out of a high school band. But one question has always bugged me, maybe you can help:

If, say, Middle C on a guitar resonates at the same frequency as Middle C on a piano, what causes the difference in tone? Shouldn't they sound identical to one another?
[Top art courtesy of gnohz / shutterstock]