These are mostly clouds of gas that surround young, massive stars but some emission nebulae are the death shrouds of old stars. These are historically, but confusingly, called 'planetary nebulae'. Exploding stars also create emission nebulae known as ‘supernova remnants’.
The most common way for astronomers to analyse visible light from a celestial object is to split it into its constituent wavelengths to form a spectrum. Studying this allows astronomers to analyse the composition and physical condition of the celestial object under consideration.
If they are close to a star, dust clouds can reflect visible light. Such clouds usually create blue patches in space, similar to the colour of our daytime sky.