How do you know what an asteroid is made out of, and what is the classification system for asteroids?
There are many ways to tell what asteroids are made of. One way is to send a spacecraft there, for example NASA's NEAR spacecraft that orbited Eros for a year. While in orbit, the spacecraft used an infrared camera and spectrometer and an x-ray/gamma ray spectrometer to look at the composition of the asteroid.
However, we can't send spacecraft to every asteroid, and most asteroid compositions are determined using infrared spectroscopy from ground based telescopes. In the infrared, different minerals absorb different wavelengths of light. By looking at the infrared spectral absorptions, and comparing them to spectra of minerals measured on Earth, it is possible to identify the composition. This is still a difficult process, though, because asteroids are faint, and so it can be difficult to get a good enough detection to be sure about the spectrum. Usually you need to observe the object for a significant fraction of its rotation period which means that you get one spectrum for the entire object; you can't see compositional differences between different regions on the asteroid. Also, asteroids are combinations of many minerals, and so astronomers argue over what combination of minerals can form a particular asteroid spectrum. Sometimes it looks like several mineral combinations could give you similar spectra, so it can be hard to tell which one is correct.
Another way to determine the composition is to use radar. With planetary radar you send out a radio signal to the asteroid and look at what is reflected back. The radio waves react differently to different materials, for example metals look quite different from rock. This is a relatively new technique, since only in the past couple decades have we had the technology to look at lots of small and faraway objects with radar. Therefore, there aren't as many asteroids that have been classified based on radar observations.
Asteroids are classified using a lettering system which, in my opinion, is one of the more non-intuitive classification systems in astronomy. There are usually 14 classifications (A,B,C,D,E,F,G,M,P,Q,R,S,T,and V), but some scientists don't believe that some of the classifications should be distinct and some of the classifications seem to contain many more types. The asteroids are placed into a letter group based on their spectral characteristics, not based on their "real-life" characteristics, but some of the letters correspond to familiar things. For example, S type asteroids are "stony" and M type are probably metallic. Just as an example, the description for the "A" classification might be "extremely reddish shortward of 0.7 microns; strong absorbtion feature longward of 0.7 microns..." (quoted from Tholen and Barucci, 1989).
To add to the confusion, meteorites, which are pieces of planets or asteroids that have fallen to Earth, are classified in a similar but separate manner. This is because we can measure the meteorites in a lab, so it's much easier to tell what they are made of. Right now, people are trying to connect the meteorite classes with the asteroid classes, but it's hard because we don't get the same information from telescopic spectroscopy that we get from a lab on Earth. So it's possible that one type of meteorite could come from asteroids in multiple classes, or several types of meteorite could come from a single asteroid class.