The planets move around the Sun in almost circular orbits
If an object is travelling in a circle it is constantly changing direction, which means it is constantly accelerating
This also means it is constantly changing velocity (but NOT changing speed)
For an object to accelerate, there must be a force acting on it
This force is directed towards the centre of the circle
The force would cause the object to just fall towards whatever it was orbiting, but as the object is already moving, it just causes it to change its direction
The object keeps accelerating towards what it's orbiting but the instantaneous velocity (which is at a right angle to the acceleration) keeps it travelling in a circle
The force that makes this happen is provided by the gravitational force (gravity) between the planet and the Sun (or between the planet and its satellites)