Not all musical instruments give notes of a particular pitch. Many percussion instruments like drums, triangles and cymbals are instruments used for rhythms. They do not play tunes because they have no definite pitch (although often a definite pitch can just be heard when listening carefully.)
Some musicians have a sense of absolute pitch or perfect pitch. This means that they always know what note is being played, even without comparing it to another note. Having a sense of absolute pitch does not necessarily make someone a good musician, although it can be very useful.