Since the interstellar medium is not within our reach on Earth for direct observation, you may wonder how scientists learn about it. There are a few different ways this is done:
There are some effects of the interstellar medium which are seen visually, such as the dark areas and interstellar reddening caused by the interstellar dust. Although this tells scientists a little about location, it does not tell them much more.
Scientists also use satellites and probes to make better observations of outer space and the interstellar regions. These spacecraft are used to obtain infrared Images, as well as images in different wavelengths of light.
Astrophysicists also use spectral analysis to learn what the interstellar gas is made of. This technique uses a diffraction grating (similar to a prism) that separates light into the wavelengths -- or, in visible light, the colors -- that make it up. If you have ever used a crystal to make rainbows out of sunlight, you have done something similar. Spectral analysis takes that a step further: black lines in the otherwise continuous spectrum show that some of the light is being absorbed on its journey between the light source and us, and the position of the black line tells scientists what element has absorbed the light.
As you can see, this allows astronomers to look for the signature of interstellar gas in the spectra of neighboring stars.
Even though the particles that make up the interstellar medium are not directly available on Earth, there are some particles which can be sampled by space probes. Because uncharged particles from the interstellar medium are not affected by the solar wind, they are able to penetrate our solar system to 3-4 AU [that is, 3-4 times the distance from the Earth to the Sun] from the Sun, where photoionization and charge exchange occurs to ionize the particles. (Photoionization is what happens when an energetic photon -- for example, a suntan-causing UV ray -- knocks an electron off an atom; and charge exchange occurs when an ion hits an atom, takes its electron(s), and leaves the atom charged.)
The ionized particles are then picked up by the solar wind and carried outward again, hence the label "pickup ions". These particles are observed and studied by different space probes to examine their properties, and the composition of the neutral interstellar gas can be determined -- information which can lead to new data on the physical state and the composition of the interstellar medium.
Download the QuickTime movie that explains how we learn about the Interstellar Gas!