Answer:
The gravity pulls the sun and the planets together, while keeping them apart. The inertia provides the tendency to maintain speed and keep moving. The planets want to keep moving in a straight line because of the physics of inertia. However, the gravitational pull wants to change the motion to pull the planets into the core of the sun. Together, this creates a rounded orbit as a form of compromise between the two forces.