Basically motion and rest is a relative concept. When we say that an object is moving this means we are observing that object with respect to earth. But when we are sitting in a moving train we are in rest with respect to the train and we realise that our surrounding outside the train moving in opposite direction of the motion of the train.