Motion and rest are relative concepts. There is no absolute rest. We can define the state of rest or motion only with respect to another object or a point in space taken as reference.
For example, a person inside a train considers himself to be at rest with respect to the fellow passengers or the walls of the train. But when he looks outside, he finds himself to be in motion with respect to the trees outside. Hope the idea is clear