When we talk about the motion of an object, we first determine a reference frame and then according to this reference frame we discuss the motion of the object. With respect to Earth, the Sun appears to move across the sky, but it is the Earth which is actually spinning and causing that apparent motion.
Study of Motion
The world, and everything in it, moves. We see cars and trains moving, a person walking on the street, birds flying in the sky, a leaf floating in the breeze. Even seemingly stationary things such as buildings move with Earth′s rotation. Earth orbiting around the Sun, the Sun's orbit around the center of the Milky Way galaxy and the galaxy′s migration relative to other galaxies are all examples of such movements. In fact, nothing in the entire universe is completely stationary.
Reference Frame: All motions are relative to some frame of reference. An object is said to be in motion if the position of the object changes with respect to some reference frame. If an object is said to be at rest, then it means that it is being described with respect to a reference frame that is moving together with the body. The reference frame is called the 'observer' and is arbitrarily chosen. The example below illustrates the concept of an observer.
Look at a person standing in a playground. His position relative to the ground, the trees and the buildings in the background does not change. So it appears as if he is at rest. But he is standing on the ground i.e. on the Earth, which rotates on its axis revolving around the Sun. If we have a facility to stand on the Sun, we will feel that the person is moving! That is the person is rotating as well as moving forward, along with the Earth. Thus, the person is at rest (or is not moving) relative to the ground, the trees and the buildings. But, on the other hand, the person, along with the ground, the trees and the buildings, is moving with respect to the Sun.