Inertial frame of reference
From Academic Kids

When there is no force being exerted on an object then the object will move inertially. This is also called 'free motion'. For example: a space module that is not firing any thrusters. (If this space module is located in intergalactic space in a region of space where gravitational influences of surrounding galaxies cancel then that is effectivily a zerogravity environment.) A frame of reference that is defined as comoving with that object is an inertial frame of reference. This definition also covers rotation. A spinning gyroscope will maintain its orientation. To change the orientation of a spinning gyroscope a torque must be applied. When this torque is applied inertia manifests itself, it is inertia that maintains the gyroscope's orientation. A gyroscope that is suspended frictionfree allows an observer to maintain zero rotation with respect to the comoving inertial frame of reference.
All reference frames that move with constant velocity and in a constant direction with respect to any inertial frame of reference are members of the group of inertial reference frames.
Contents 
Newtonian dynamics
In newtonian dynamics it is assumed that when no force is being exerted objects will move in straight lines. This assumption is based on observations and the assumption that space is Euclidean.
The expression <math>\mathbf{F} = m\mathbf{a}<math> has a striking feature: it does not mention velocity, the velocity of the accelerating object is not part of the calculation; the ratio of force to amount of change of velocity is independent of velocity. This property of that law of motion expresses a fundamental property of motion; velocities are indistinguishable. Therefore an observer can choose any inertial frame of reference as a coordinate system for calculations, the laws of motion will apply. The group of inertial frames of reference is the only group of frames of reference in which the same laws of motion hold.
In the conceptual framework of newtonian dynamics it is sufficient to define motion in a straight line and with constant velocity as inertial motion.
Special Relativity
Special relativity not only identified the Lorentz transformations as the appropriate transformations between inertial frames of reference, it also brought the perception that the 'laws holding good' for all members of the group of inertial frames of reference also includes the laws of electrodynamics, not just the laws of kinematics.
General Relativity
In relativistic dynamics it is recognized that the assumption that space is euclidean is not justified in general. However, it is possible to formulate a consistent and accurate dynamics on the basis of having the concept of 'inertial frame of reference' relate to measuring whether there is acceleration due to a force being exerted. For example, a weight within a box is suspended on all sides with springs, acts as an accelerometer. When the accelerometer is being accelerated by a force, the weight in the box will "lag behind", as inertia manifests itself when the velocity is changing due to a force being exerted. If there is no manifestation of inertia then by definition the frame of reference that is comoving with that is an inertial frame of reference.
In general relativity it is defined that way because the observation that even the most refined accelerometers do not measure any acceleration when they are in free fall in a gravitational field is taken as indication that there is fundamentally no acceleration in the local volume of space that is occupied by and surrounds a free falling object.
Unified description of gravity and inertia
In general relativity, both gravity and inertia are described as interactions of matter with the geometry of spacetime. Put very succinctly: spacetime geometry tells matter how to move, matter tells spacetime geometry how to deform.
When matter is moving through nondeformed spacetime (in other words: straight spacetime), it follows paths that are the same as euclidean straight lines. These lines are universally straight, meaning that when they are viewed from a distance they are still observed to be straight, they are straight lines universally. Objects that are moving through straight spacetime can only move in straight lines and with constant velocity: that is the only free motion that straight spacetime allows. When there is a change of velocity due to a force being exerted then inertia manifests itself.
When matter is freemoving through deformed spacetime it follows geodesics. Geodesics are paths with no manifestion of inertia. When a force is deviating an object from moving along its proper geodesic, inertia manifests itself. In curved spacetime, the concept of an inertial frame of reference is definable only locally, because of the deformation of spacetime geometry by matter. Matter is lumped together in Suns and Planets and so on, and in the neighbourhood of these gravitating bodies there is spherically symmetrical deformation of spacetime geometry. Part of the deformation of spacetime geometry is alteration of the rate of time. An object free falling towards the center of gravity of a gravitating mass is moving along its proper geodesic. The local frame of reference, comoving with that object, is a local inertial frame of reference.
The gravitoinertial field
According to general relativity, there is a single field, which can be called the gravitoinertial field. Gravitational interaction is mediated by deformation of something that is present anyway: spacetime geometry. The property of inertia exists because of the universal presence of the gravitoinertial field; interaction with spacetime geometry is telling a rotating planet how much to bulge at the equator.
An accelerometer measures whether it is accelerating with respect to the local spacetime geometry by interacting with it. It is important to note that an accelerometer does not measure its velocity with respect to any absolute frame. Velocity is fundamentally relative.
A spinning gyroscope measures whether it is rotating with respect to the local spacetime geometry by interacting with it. Since it is very rare for local spacetime geometry to rotate significantly with respect to the universe, a spinning gyroscope is in effect displaying which frame of reference is not rotating with respect to the universe.
The concept of inertial frames of reference as recognized in general relativity is usually introduced by discussing kinematic phenomena only: accelerometers, gyroscopes. But it is not just dynamics: in the inertial frames of reference as recognized by general relativity, all laws of physics hold good.
See:Orbital state vectorsde:Inertialsystem fr:Référentiel galiléen it:Sistema di riferimento inerziale nl:Inertiaalstelsel pl:Układ inercjalny sl:inercialni opazovalni sistem