Both gravity and centrifugal forces.
Gravity pulls us towards the sun, but the centrifugal forces pulls us away from the sun. It's the balance between the 2.
If it wasn't for centrifugal forces, we would have fallen into the sun thanks to gravity. And if it wasn't for the sun's gravity, centrifugal forces would have flung us into the far reaches of the galaxy.
Like I said, the balance between the 2.