Spacetime is a quasiriemannian manifold (it's almost a differential manifold, only instead of a metric you only get a quasimetric -- its square may be negative).

Imagine old-fashioned obsolete Galilean space. Given 2 points, if we wish to calculate the distance between them, we employ the distance element defined by

ds2 = dx2 + dy2 + dz2,
as known to dear old Pythagoras. However, in space-time we use a different element, and call the result of integrating it interval rather than distance (you can use the speed of light as a constant to convert time to distance, to allow you to subtract the 2 quantities):
ds2 = dt2 - (dx2 + dy2 + dz2).
Note that if you want ds to be real, you have to ensure that nothing travels faster than the speed of light.

Another way of talking about the second equation is to multiply dt not just by c, but also by i. Then ds2 is simply minus the sum of squares of the 4 coordinates.