An immediate corollary is that the two spaces involved are both compact Hausdorff spaces.
The idea that this captures is that Hausdorffness is about having “enough” open sets whilst compactness is about having “not too many”. Thus a compact Hausdorff space has both “enough” and “not too many”. This theorem says that both conditions are at their limit: if we try to have more open sets, we lose compactness. If we try to have fewer open sets, we lose Hausdorffness.
The above theorem is a special case of a slightly more general result.
To prove this, we need to show that a closed subset of is taken to a closed subset of and that the preimage of a compact subset of is compact in . Both follow from the fact that closed subsets of a compact set are compact and that compact subsets of a Hausdorff space are closed.
For the first, let be closed. As it is a closed subset of a compact space, it is compact. Since is continuous, is a compact subset of . Thus as is a Hausdorff space, is closed.
For the second, let be compact. As it is a compact subset of a Hausdorff space, it is closed. Thus as is continuous, is closed in . Hence as is compact, is compact.