|The Trifid Nebula, Messier 20, in Sagittarius.|
The first type of nebulae, emission nebulae, are represented by the reddish region at the top. This red light comes primarily from hydrogen atoms in the gas being excited by copious amounts of ultraviolet light from the hot, young stars inside and around the nebula. The particular wavelength responsible is at 656.28 nanometers and is so important and wide-spread that it has its own name: hydrogen-alpha, or H-alpha for short.
The second type of nebulae is the blue reflection nebula seen below the emission nebula. These nebulae come about from starlight being reflected off of tiny dust grains in the gas cloud. The reason it appears blue is because the dust grains preferentially reflect blue light, the same way that the molecules in the Earth's atmosphere preferentially scatter blue light. Further from the young stars than the emission nebula is, the gas in the reflection nebula isn't being excited to emit in visible wavelengths very strongly.
Finally, the third type of nebulae, dark nebulae, also come about as result of dust and are represented by the dark clouds and bands of dust in front of the emission and reflection nebulae. Dark nebulae are full of tiny dust particles containing organic molecules that are extremely effective at absorbing visible light. Soot is actually fairly close in composition to these dust particles, so you have some idea of just how dark they are in visible light. Fortunately, they are much more transparent at other wavelengths, allowing us to probe their structure in infrared and radio wavelengths.
Also, to be comprehensive, there is a fourth type of nebula that typically gets its own name: planetary nebulae. These are really a subset of reflection nebulae, as they are the puffed-off atmospheres of old Sun-like stars that are being illuminated by the white dwarf core of the star, but they are different enough from typical emission nebulae to warrant their own designation.