Two opposing forces hold all the planets in their orbits. Imagine a ball being whirled around your head on a string. The whirling force which would send the ball far away if you let go of the string is due to the speed of the planets; the string that holds the ball in place is the force of gravity produced by the Sun.
There are nine planets, at least fifty-four moons, more than a thousand comets, and countless asteroids and meteoroids, together with a background of dust, that are all orbiting the Sun, held in place by these two forces.
The video below looks closely at the surface of the Sun, showing the flares that send out huge masses of matter into space.