In general, there is a relative movement between two moving objects.
If two vehicles are moving towards each other at 100 km/h, both drivers
will see the other approaching at a relative speed of 200 km/h.
You would expect the same to apply to two light beams. If you were
piggybacking on such a beam, the beam from the opposite direction to
you should have a relative speed of twice the speed of light. However,
that turned out to be incorrect. In 1861, Scottish physicist James Clerk
Maxwell had formulated a revolutionary theory of electromagnetism.
It predicted that the speed of light is a fundamental natural constant.
If beams of light adhere to the laws of relative motion, this would not be
consistent with the principle of relativity. How could the speed of light
be a constant and yet depend on the movement of the observer? Einstein came up
with the solution that light moves at the same speed in each frame of reference.
Einstein's called his solution to the contradiction between Maxwell's theory
of electromagnetism and the laws of relative motion the "special theory of relativity".
At low speeds, the results followed everyday
laws and allowed the speeds of two approaching vehicles to be simply added together.
The results are completely different at high speeds. They predicted Lorentz's
shrinkage, in which fast-moving objects become shorter in the direction of
their movement. Another effect is "time stretch", which means that fast-moving
objects age less quickly than stationary ones. An astronaut traveling for a year
at 99 percent of the speed of light on return to Earth will discover that
seven years have passed there.
Relativity means that two events that happen simultaneously in someone's frame of reference are not necessarily simultaneous for another moving at a different speed. Imagine an incandescent lamp in the middle of a railway wagon. An observer in the wagon turns on the lamp and sees that both ends of the wagon are lit simultaneously. However, an observer on the platform who sees the train passing by is more likely to see the beam hitting the rear of the wagon first. According to Einstein's theory, the speed of light for a stationary observer has the same value, despite the movement of the train. That is why he sees the rear of the wagon moving towards the light and the front of it. Therefore, the light first hits the back.
The special theory of relativity caused a lot of controversy in physics, especially because of the way in which time was approached. Before Einstein, physicists assumed that the three spatial dimensions and time were very different magnitudes. Relativity brought them together and time became the fourth dimension of a unified continuum that physicists call "space-time". Strangely enough, most of the work for space-time physics was done by German mathematician Hermann Minkowski. He was the math teacher at the Zurich Polytechnic Institute who at the time called the barely motivated Einstein a "lazy dog".