The trees appear to be moving while traveling in a train because the position of the trees outside the train is changing with respect to us (inside the train). Whereas, our co-passengers in the train seem to be stationary because their position is not changing with respect to us.