The sun constantly emits charged particles called solar wind, which travel far beyond the planets, before being slowed down by gases and dust at the far reaches of the solar system. This forms a sort of bubble around the sun and planets, known as the heliosphere.

The exact limits of the heliosphere remain unknown, but it is estimated to extend at least 9-10 billion miles (14-16 billion kilometres) to the edge of the solar system.

The heliosphere controls the electrically neutral gas, ionized gas, and interstellar dust that form the solar system’s galactic environment. It also interacts with planets in different ways. Those that have an internally generated magnetic field, such as Earth, Mercury and the outer planets, form an atmosphere that protects the planets from direct exposure to the solar wind. Those that do not have a magnetic field, particularly Mars and Venus, suffer atmospheric erosion from the solar winds as a result.

More Info: en.m.wikipedia.org