Imagine two stakes in your backyard. Now draw an east-west, north-south coordinate system on your lawn. Measure the east-west distance between the stakes and also the north-south distance. Take the square root of the sum of the squares of the two measurements and, voilà, you end up with the "distance" between the two stakes.
You could have just as well used a different coordinate system, and you would have arrived at the same answer. According to the Pythagorean theorem, any right triangle will do the job—you'll always compute the same distance between the stakes.
This is a basic fact of Euclidean geometry.
It works on a plane, but would not work if your backyard was not flat. In the flat three-dimensional spatial world in which we happen to live, distance is "invariant" to the coordinate system we use when conducting our measurements.
But wait... actually, we live in four dimensions.
When you add in time, points are in space-time. Two points represent two events, and the distance between them is known as the "interval". The interval is computed differently in four dimensions.
You still sum the squares of all the distances, but now you also subtract the square of the time (measured in seconds times the speed of light) between the events. And just like in your backyard, the length of the interval you arrive at is invariant to changes in coordinate system (in this case a coordinate system is called an "inertial reference frame").
And that is really all there is to Einstein's theory of special relativity, leading to slow moving clocks, shrinking rods, twin paradoxes, and E = mc2.