Any principle of relativity prescribes a symmetry in natural law: that is, the laws must look the same to one observer as they do to another. According to a deep theoretical result called Noether's theorem, any such symmetry will also imply a conservation law alongside. For example, if two observers at different times see the same laws, then a quantity called energy will be conserved. In this light, relativity principles are not just statements about how scientists should write laws: they make testable predictions about how nature behaves.
The special principle of relativity states that physical laws should be the same in all inertial reference frames, but that they may vary across non-inertial ones. It has been used in both Newtonian mechanics and Special relativity; for the latter, its influence was so strong that Max Planck named the theory after the principle.
The principle forces physical laws to be the same in any vehicle moving at constant velocity as they are in a vehicle at rest. A consequence is that an observer in an inertial reference frame cannot determine an absolute speed or direction of their travel in space; they may only speak of their travel relative to some other object.
The principle does not extend this property to noninertial reference frames because those frames do not, in general experience, seem to abide by the same laws of physics -- these frames require fictitious forces to describe motion.
Newtonian mechanics added to the special principle several other concepts--various laws and an assumption of an absolute time. When formulated in the context of these laws, the special principle of relativity states that the laws of physics are invariant under a Galilean transformation.
In their 1905 papers on electrodynamics, Henri Poincaré and Albert Einstein explained that with the Lorentz transformations the relativity principle holds perfectly. Einstein elevated the (special) principle of relativity to an axiom of the theory and derived the Lorentz transformations from this principle combined with the principle of the independence of the speed of light (in vacuum) from the motion of the source. These two principles were reconciled with each other (in Einstein's treatment, though not in Poincaré's) by a re-examination of the fundamental meanings of space and time intervals.
The strength of special relativity lies in its derivation from simple, basic principles, including the invariance of the laws of physics under a shift of inertial reference frames and the invariance of the speed of light. (See also: Lorentz covariance.)
Physics in non-inertial reference frames was historically treated by a coordinate transformation, first, to an inertial reference frame, performing the necessary calculations therein, and using another to return to the non-inertial reference frame. In most such situations, the same laws of physics can be used if certain predictable fictitious forces are added into consideration; an example is a uniformly rotating reference frame, which can be treated as an inertial reference frame if one adds a fictitious centrifugal force and Coriolis force into consideration.
The problems involved are not always so trivial. Special relativity predicts that an observer in an inertial reference frame doesn't see objects they'd describe as moving faster than the speed of light. However, in the non-inertial reference frame of Earth, treating a spot on the Earth as a fixed point, the stars are observed to move in the sky, circling once about the Earth per day. Since the stars are light years away, this observation means that, in the non-inertial reference frame of the Earth, anybody who looks at the stars is seeing objects which appear, to them, to be moving faster than the speed of light.
Since non-inertial reference frames do not abide by the special principle of relativity, such situations are not self-contradictory.
General relativity was developed by Einstein in the years 1907 - 1915. General relativity postulates that the global Lorentz covariance of special relativity becomes a local Lorentz covariance in the presence of matter. The presence of matter "curves" spacetime, and this curvature affects the path of free particles (and even the path of light). General relativity uses the mathematics of differential geometry and tensors in order to describe gravitation as an effect of the geometry of spacetime. Einstein based this new theory on the general principle of relativity, and he named the theory after the underlying principle.