Outer space contains a low density of particles, primarily hydrogen gas, along with electromagnetic radiation. Many people, however, mistakenly believe outer space is a complete vacuum. The term "outer space" is used mainly to distinguish the space between planets from the planets and their airspace.
Mashable notes that it is the almost total lack of gas molecules that leads many people to assume outer space is a total vacuum. Large bodies, primarily planets and stars, pull most gas molecules toward themselves through gravitational attraction. What is left is a relatively low density of gas molecules and waves of electromagnetic radiation emitted by the sun. In other words, there is not much between planets and stars, but matter does exist in these spaces.
According to space and astronomy news website Space.com, while the Earth is particularly laden with gas molecules, its exosphere, or highest layer above the atmosphere, is remarkably thin, merging into outer space. The exosphere contains only highly dispersed particles of helium and hydrogen.
Even intergalactic space contains some matter, according to Scientific American. The diffuse gas of intergalactic space is primarily dark energy and dark matter, meaning it is not influenced by the sun and is likely composed of highly weak interacting particles formed shortly after the Big Bang.