The interstellar medium (ISM) is the matter that exists in the space between stars in a galaxy. It is composed of gas, dust, and cosmic rays, making up about 10% of a galaxy's total mass. The gas in the ISM is primarily hydrogen and helium, with trace amounts of heavier elements.
The ISM plays a crucial role in the life cycle of stars. It serves as the material from which new stars form, and it is also where stellar remnants, such as supernovae, release energy and enrich the medium with heavier elements. This process contributes to the ongoing evolution of galaxies like the Milky Way.