It is the theoretical framework that explains the behavior of the universe at the level, that is, at the level of galaxies, planets, stars or solar systems and other celestial bodies. Any theory of motion that attempts to explain the way that speeds (and related phenomena) appear to vary from one observer to another would be a Theory of Relativity.
Both the theory of general relativity theory and the special theory of relativity. Both were introduced by scientist Albert Einstein in the early 20th century.
The two theories of relativity laid the foundations of modern physics and thanks to them we were able to better understand the workings of the universe, as well as the structure of space and time.
The theory of Special Relativity: First it says: that the speed of light is a constant, that is, no matter what frame of reference is used, the speed of light does not change.
Similarly, there are other constants: the electric charge and the phase of a wave.
Second: Einstein declares that there is a fourth dimension: time, therefore, the universe is within what is now called chronotope or space-time, this makes a constant apart from the previous one: the distance between any two points in the universe it does not vary in space-time, for this to happen, if two points move apart, time and space are distorted, keeping space-time constant.
Third: mass and energy are equivalent, from where the equation E = mc2 comes, which would translate as the energy of a body (at rest) is equal to the mass of the body times the speed of light raised to the second power.
Fourth: the Lorentz transformations, which were a mathematical curiosity since practically all contributors and mathematicians know them but knew exactly how to use them, were used by Einstein instead of the Galieo transformations (used by Newton) to explain relative motion and with them to obtain that the mass, the length of an object and the time change with the speed, in other words, explain the distortion of the space-time. As the Galileo transformations are a particular case of the Lorentz transformations, we could say that Newtonian mechanics is a particular case of relativistic mechanics (or the theory of relativity).
Fifth: an observer cannot distinguish whether his frame of reference is mobile or static unless acceleration occurs.
Sixth: The laws of the universe apply equally in any inertial frame.
It became necessary, when certain anomalies in the universe could not be explained according to Newtonian mechanics or classical physics. It has some antecedents such as the Lorenz transformations, the fact that the speed of light does not change in any frame of reference, the fact that Mercury deviates from the orbit predicted by Kepler and Newton without the existence of another body to attract it. It was not the sun to name a few.