The motion of an object is observed from two points A and B. With time the object changes its position continuously with respect to A but not from B. Therefore:
The object is in motion with respect to A
The object is at rest with respect to B
As the object changes its position with respect to point A means it is in motion with respect to A but with respect to B, it is at rest.
Example:- If a person who is sitting inside a train is observed from a point outside the train, then the person is in motion. Moreover, if the same person is observed from a point inside the train, then the person is at rest. So, the state (motion or rest) of an object depends upon the frame of reference with which object is observed.