What do I need to know to difference a note for different musical instruments? for example, if they play the same note, (same frequency), how can I difference them if they have the same frequency?
Any (melody) musical instrument note has a fundamental frequency (think "a sine wave") which our ears tend to interpret as a "pitch", and a number of harmonics (extra sine waves) which are integer multiples of that fundamental frequency. These extra sine waves with double, triple, ... times the fundamental frequency add up to something that our ears tend to interpret as a timbre. The reason for why you find this special relation between fundamental frequency and harmonics is a consequence of the physics of how real instruments make sound.
The difference between an "A4" note on a piano and an "A4" note on a violin is in which harmonics are present in the sound, and how strongly they are present. One way to examine this is by comparing their respective spectrograms. Several audio tools allow you to draw a spectrogram for a given sound (e.g. sonic visualizer or audacity).
For percussive instruments there's no easy relation between fundamental frequency and harmonics and the spectrum typically looks much noisier (many more high frequency components). Also the spectrum at the start of a melody instrument note (the so-called "attack") will typically look noisier.