This is a fascinating review of the concept and history of inertial frames, from Galileo to Einstein.

A frame of reference is a coordinate system used to measure the relative position of bodies within it.

An inertial frame is a frame of reference that is considered to be either not moving, or moving at a perfectly even speed in a perfectly straight direction. The two are considered to be the same, for the purpose of defining relative motion within the frame. Any change of speed or direction requires a force (as the definition of force) so an inertial frame has no external forces acting on it. A non-inertial frame is one that is changing speed or direction in some way. Both of these are artificial constructions for the purpose of deriving a consistent understanding of relative motions, since there is no absolute way to measure true motion.

Einstein recognised that the concept of an inertial frame, where forces could define motion, depends on a universal definition of time across different frames. But this cannot be, because the speed of light is absolutely the same in all frames, regardless of their motion. If electromagnetic impulses like light are not relative to the motion of the frame of reference , it means that the coordinates of the frame must appear to contract. These are time and distance (space).