The Heine-Borel theorem states that in Euclidean space, a subset is compact if and only if it is closed and bounded. This theorem is fundamental in real analysis as it characterizes compactness, which is crucial for understanding continuity, convergence, and the behavior of functions on closed intervals.