Rest and Motion are Relative Terms.
An object which is at rest can also be in motion with respect to different refernce points.
eg.) A passenger travelling in a bus; the passenger is at rest with respect to the fellow passengers but it is in motion with respect to the ground
A rock is rest with respect to person in earth
And in motion with respect to a man in other planet as earth rotate sun