Solar Gravity: Understanding the Direction of the Sun's Gravitational Pull
The force of gravity that the sun exerts on a planet is directed towards the center of the sun.
This is because gravity is a force of attraction between any two objects with mass. The sun has a much larger mass than any planet in our solar system, so the sun's gravitational pull dominates the interaction.