Motion is the change of location or position of an object with time relative to an observer.
Motion of an object is only relative to the position of another object.
Motion cannot be measured independently, it is relative to an observer. So if a body is changing its position and location with time with respect to the observer, then it is said to be in motion.
For example, the door of a moving train is in motion with respect to an observer standing on the ground. But, it is at rest with respect to a passenger sitting in the moving train.