Einstein's principle of relativity states that the same physical laws are observed from any inertial reference system (the same forces are observed from all of them).
In the following visual you have two reference systems: the one of the observer who is outside the train and the one of the observer who is inside, both observing a box which is in the compartment.
The moving observer inside the train will be an inertial reference system or not, depending on whether the train's movement is uniform or uniformly accelerated.
The outside observer constitutes an inertial reference system in all cases.
While the train travels at a URM both see different things, the velocity of the box is 0 for the traveller on the train and v for the outside observer. The acceleration and the force which act on the box are identical = 0 for the two observers. These are inertial reference systems.
When the train accelerates,
the moving observer on the train needs a fictitious force, or inertial one, to explain the movement of the box towards him; in this case the observer is in a non-inertial reference system. The outside observer  just needs the frictional force to explain the movement of the box.
The three activities will guide you through the process of understanding this different behaviour.

Licencia de Creative Commons Licencia Creative Commons Reconocimiento-No Comercial-Compartir Igual 3.0 España
logo INTEF
Ministerio de Educación, Cultura y Deporte