Consider the emission of a spherical light wave as observed in an inertial reference frame (with coordinates {t,x,y,z}). At a time t after emission, the light front forms a sphere of radius ct, so that x^{2} + y^{2} + z^{2} = (ct)^{2}, which can be rewritten as (choosing units in which c=1),
t^{2}  x^{2}  y^{2}  z^{2} = 0
Now, consider a different inertial frame, with coordinates {t',x',y',z'}, sharing the same origin as the original frame. According to the speed of light postulate, light will be emitted at speed c in this frame as well, so:
t'^{2}  x'^{2}  y'^{2}  z'^{2} = 0
Thus, we see that the quantity t^{2}x^{2}y^{2}z^{2} is a constant (equal to zero) in all frames, for the case that the point (t,x,y,z) can be reached from the origin by a light ray. (i.e., a "lightlike" or "null" separation).
I have not proven that this quantity is the same ("invariant") for all separations (not just lightlike ones), however. That is a little more complicated. But you can find a very nice derivation of it in Schutz's book A First Course in General Relativity, if you know some matrix algebra.
This quantity, the "spacetime interval", is quite interesting: if you write it with a sign difference as s^{2} = x^{2} + y^{2} + z^{2}  t^{2}, it looks very much like the Pythagorean theorem; we interpret the quantity s as the "spacetime distance" between the origin and a point. It turns out that the physical theory of special relativity is completely equivalent to the geometry of Euclid in four dimensions, except with this slightly altered Pythagorean theorem. The minus sign in the equation is what makes time different from space in relativity.
