The Sun and Earth attract each other
All objects that weigh something attract each other with an invisible force. The larger the mass of an object, the stronger its attraction. According to Newton’s law of gravity, gravity is inversely proportional to the square of the distance between the two bodies. A planet located twice as far away from the Sun as another one is consequently only affected by one quarter of the force.