A vacuum gauge measures the amount of vacuum, or "suction" the engine creates in the intake manifold. It attaches trivially to any vacuum port on the intake manifold. Vacuum gauges can tell you a lot about the way your engine is behaving, and can give you a clue about its health.
A compression tester measures the compression of an individual combustion chamber (cylinder) and attaches at the spark plug socket. If there's low compression, there's something wrong with either that cylinder, the timing, or the entire thing. It gives you a solid concrete piece of evidence about the engine's health.
They are both gauges that show differences in pressure compared to atmospheric pressure. A compression tester can handle much more of it. I'm assuming it also has a check valve that means it maintains the highest reading even after the compression event has passed.