The principle of relativity is a requirement that the laws of physics and the equations that describe them have the same form in all frames of reference.
For example, in special relativity, Maxwell's equations have the same form in all inertial frames of reference. In general relativity however, it is Maxwell's equations and the Einstein field equations that retain the same form in arbitrary reference frames.
The principle of relativity is implicitly applied by Newtonian mechanics. However, it is made more explicit in Albert Einstein's general theory of relativity.
Galilean relativity or invariance
Galileo Galilei
Galileo Galilei, in 1632, in his Dialogue Concerning the Two Chief World Systems, gives the example of a ship traveling at a constant velocity. There is no rocking and the sea is completely smooth. An observer below the deck would not be able to tell whether the ship was moving or not. This is where we get the notion of Galilean relativity or invariance. This is the principle that the laws of motion are the same in all inertial frames.
Isaac Newton based his physics on absolute time and space. However, he also adhered to the principle of relativity laid our by Galileo Galilei. Newton restated the principle precisely for mechanical systems.
'Relativity' is a concept that we associate with Einstein, however, the concept goes back even further. Galileo, and even Newton, and others, were aware that velocity is relative. Velocity is the speed and direction of an object's motion.
An object's velocity can be specified only in relation to that of another object.
Poincare
Henri Poincare
Albert Einstein
Henri Poincare, had proposed his "relativity principle" before Albert Einstein publishes his special theory of relativity in 1905. This was a general law of nature.
Poincare discussed the "principle of relative motion" in two papers in 1900. He also named it the "principle of relativity" in 1904.
No physical experiment can discriminate between a state of uniform motion and a state of rest.
Special relativity
The first postulate of the special theory of relativity is as follows:
"Special principle of relativity: If a system of coordinates K is chosen so that, in relation to it, physical laws hold good in their simplest form, the same laws hold good in relation to any other system of coordinates K' moving in uniform translation relatively to K."
This postulate actually defines an inertial frame reference. Physical laws should be the same for every inertial frame of reference. However, they may vary across non-inertial ones. This principle is used both in Newtonian mechanics and in special relativity.
Physical laws are to be the same for any body moving at a constant velocity as they are for a body at rest.
Poincare and Einstein, in their 1905 papers, showed that the Lorentz transformations perfectly allow for the principle of relativity.