Basics of relativity

In order to understand why Einstein concluded that speed of light, 'c' , was a constant, and how this led to the whole concept of mass and time dilation, you first need to understand Galilean relativity:
(Note: an accelerating object is one that is NOT at a constant speed in a straight light or simply standing still.)
 Relativity says that the laws of physics must behave the same in any inertial frame of reference, and an inertial frame of reference being one that is not accelerating.
That is, there is no experiment you can perform to tell whether you are standing still or moving at the same speed in a straight line,
In a frame of reference that is not accelerating, there is no experiment one can do to prove that they're in motion. This means that even if one were travelling through space at 1000,000,000.... km/h, there is no way to tell whether they are motion relative to the objects around or vice-versa.

Now, there was a little problem with this a bit before Einstein...
 It was found that light showed wave-like behaviour, so it was concluded that it was a wave (an electromagnetic wave).
As far as it known, every wave needed a medium to travel through, for example, waves in the ocean need water, sound waves need, well, anything really, as long as there's something... As such, it was thought that light waves must've been travelling through a medium, too.
The medium that was hypothesised was the aether; some sort of field or substance that evenly filled all space everywhere and was 'undetectable'.
... Can you guess the problem that came from this?
We would be able to tell whether we are moving in an inertial frame of reference because the light would travel slower relative to us! For example, if we were standing still in space, say light would move at 300 km/h, but if we move in the same direction as light at 200 km/h, we would see light travelling at 100 km/h, thus we could conclude we are moving.
This breaks Galilean relativity!
Einstein, therefore, concluded that the speed of light was the exact same to ALL frames of reference. One could get close to the speed of light to try and catch up to it, but it would still move relative to them at 300M m/s, while also appearing to move at 300M m/s to a standing still observer.

How could this be? I mean, if you shoot a bullet at 100 km/h and run at half of its speed, 50 km/h, it would appear to move half it's speed relative to you; you would see it moving at 50 km/h. HOWEVER, someone standing still watching this would see the bullet go at 100 km/h and you at 50 km/h.
Well, this does not happen with light according to Einstein. Sounds crazy, right? I understand. This is counterintuitive and sounds impossible at first.
What Einstein concluded is that space and time will contract and dilate to make it so.
If you were moving close to the speed of light, space would appear shorter to you. When X seconds passed for you, >X seconds passed for someone standing still.
The spacetime fabric adapts to make the light appear to always be moving at it's constant speed.

Let that sink in for a bit. I'd recommend watching videos on Einstein's thought experiments and length contraction to visualize it better.