Open Covers and Compact Spaces
WHEN FINITELY MANY MEMBERS OF ANY OPEN COVER ALREADY COVER THE SPACE
A family of open sets covers a space when every point of the space lies in at least one of them. A space is compact when every such family can be cut down to finitely many of its own members that still cover. It fails to be compact when one covering family resists that cut: take any finitely many of that family, and some point of the space is in none of them.
The definitions
Let \((M, \mathcal{O})\) be a topological space. A family \(\mathcal{C} \subseteq \mathcal{O}\) of open sets is an open cover of \(M\) if every point of \(M\) lies in at least one member of \(\mathcal{C}\), that is \(\bigcup \mathcal{C} = M\).
A subcover is a subfamily \(\mathcal{C}' \subseteq \mathcal{C}\) that is still a cover. It is a finite subcover when \(\mathcal{C}'\) has finitely many members.
\(M\) is compact if every open cover of \(M\) has a finite subcover.
To show a space is not compact, produce one open cover with no finite subcover and the question is closed. To show a space is compact you must answer every open cover there is, which is why the compactness of \([0,1]\) is a theorem rather than something you check.
Which spaces are compact
Both spaces below carry the standard topology on \(\mathbb{R}\), in which every open interval is open, and a subset of \(\mathbb{R}\) carries the subset topology from it.
\((0,1)\) is not compact. Cover it with the intervals \((\tfrac{1}{n}, 1)\) for every \(n \ge 2\); together they hold every point, since \(x\) is in one as soon as \(\tfrac1n < x\). The intervals are nested, so the union of any finite choice is whichever member reaches furthest towards \(0\), say \((\tfrac1N, 1)\), and \(\tfrac{1}{2N}\) is a point of the space lying outside it.
\(\mathbb{R}\) is not compact either. Cover it with \((-n, n)\) for every \(n\). Any finite choice is its widest member \((-N, N)\), and \(N\) is a point of \(\mathbb{R}\) outside it.
\([0,1]\) is compact. That is the Heine–Borel theorem, which says that a subset of \(\mathbb{R}^d\), carrying the subset topology, is compact exactly when it is bounded and is a closed set of \(\mathbb{R}^d\). The two failures above are one of each: \((0,1)\) is bounded and not closed, \(\mathbb{R}\) is closed and not bounded. Every finite space is compact whatever its topology, since a cover of it has only finitely many members to begin with.
Continuous images
The continuous image of a compact space is compact: take any open cover of the image; each member is the image met with an open set of the target, and those sets have open preimages which cover \(M\), finitely many of which already cover \(M\), and the members those finitely many came from cover the image. A real-valued continuous function on a nonempty compact space therefore has compact image, so it attains a greatest and a least value instead of merely approaching them.