The planets in our solar system are held in their orbits around the Sun by the force of gravity. Gravity is a fundamental force of nature that attracts objects with mass toward one another. In the case of the solar system, the Sun, which has a significantly larger mass than any of the planets, exerts a strong gravitational pull on them, keeping them in orbit.
Each planet orbits the Sun in a stable path due to the balance between the gravitational force pulling them toward the Sun and their inertia, which is the tendency of an object to move in a straight line at a constant speed. This balance results in the elliptical orbits described by Kepler's laws of planetary motion.
In summary, the gravitational attraction of the Sun is what prevents the planets from floating away into space, ensuring they remain in stable orbits within the solar system.