Similar to this question: Applications of connectedness I want to collect applications of compactedness.
E.g.: compact + discrete => finite, which can be used to prove the finiteness of the automorphism group of polarized abelian varieties.
Similar to this question: Applications of connectedness I want to collect applications of compactedness. E.g.: compact + discrete => finite, which can be used to prove the finiteness of the automorphism group of polarized abelian varieties. 


Any continuous function on a compact space is bounded and admits a maximum. This is perhaps the most important application to compactness. Also pretty important in my opinion is the fact that a bijective continuous map $f:X\rightarrow Y$, X,Y Hausdorff topological spaces, is automatically an homeomorphism if X is compact. Another important application of compactness is the StoneWeierstrass theorem : assuming X compact, a subalgebra of $C^0(X,R)$ is dense iff it separates points. Now something a bit more fancy : Let G be a compact group. Then the semigroup generated by an element is dense in the groupe generated by that element. All maximal connected compact subgroups of Lie groups are conjuguated to each other. Let $f_n$ a sequence of continuous functions on a compact space that converges uniformly to $f$. Then for all neighborhood $V$ of $f^{1}(0)$, and any sufficiently big n, $f_n^{1}(0)$ is contained in $V$. Compact manifolds (more generally ANR) have finitely generated homology groups. On a compact smooth riemannian manifold, there is always infinitely many geodesics connecting two points. The list goes on forever. Let me end with some famous conjecture on compact spaces (Kaplansky). Let X be a Hausdorff compact space. Are all algebra homomorphisms from $C^0(X)$ to a Banach algebra A , continuous ? 


A map from a compact space to a Hausdorff space is a homeomorphism if and only if it is continuous and bijective. This is useful to prove, for example, that all simple and closed curves are homeomorphic to the circle. 


You might be interested by this article by Terry Tao. "Compactness and Compactification" Which contains a really great discussion of compactness, applications of compactness, and what compactness means. But my favorite part of the article is the end, since it is the only part that contained a statement which really surprised me. Which I will quote directly, not feigning to describe something better than Terry Tao:



I thought I'd give the experts on this subject a day to respond. But as they haven't, I'll describe this nice computational application of compactness myself: One interesting feature of compact spaces is that they can be exhaustively searched on a computer in a finite time, even if they are infinite. A great example is described here. Consider the Cantor space of infinite binary sequences $C=2^\omega$. Suppose we have a computable predicate on this space, ie. a computable function $f\colon 2^\omega\rightarrow 2=\{0,1\}$. Then we can search all of $C$ to find an element that satisfies $f(x)=1$, or show that there is no such $x$, with an algorithm that is guaranteed to terminate. The algorithm is described here. The important point is that (with the right topology) the computable functions are continuous and that the Cantor space is compact. This means that any predicate $f$ on $C$ is uniformly continuous in the sense that there is an $n$ such that $f$ can be computed without examining more than the first $n$ digits in its argument. From that it can eventually be deduced that the search for an element of $C$ satisfying $f$ can be completed in finite time. This is somewhat surprising given that we can't exhaustively search $\mathbb{N}$ with a computable predicate in finite time, and yet $2^\omega$ seems like a 'larger' space. 


Compactness is crucial to many discretization arguments. For example, if you have a compact subset K of a domain D in the complex numbers, it is sometimes useful to cover it with a grid of squares. To do this, you argue by compactness that there is some positive delta such that every point in K is at least delta away from the complement of D. Then you place down a grid of squares of sidelength delta/2 (say), and each square that intersects K will lie entirely in D. One reason this is useful is that the boundary of the union of squares that intersect K is guaranteed to be reasonably nice in a way that the boundary of K is not. 


Compactness allows one to formulate Poincare Duality, which effectively doubles your data on the geometry of a compact manifold. 


The following maximization result makes it very explicit how one can use compactness to transfer results about finite sets to compact sets. Let X be a compact topological space and P be a (strict) partial order on X. Assume that $L_x=${$y\in X:y P x$} is open for all x. Then there exists a Pmaximal element. Proof: Suppose not. Then the family of all $L_x$ covers X. By compactness, there is a finite subcover, so X is covered by ${L_x}_1,{L_x}_2,\ldots,{L_x}_n$. So the finite set containing $x_1,\ldots,x_n$ has no Pmaximal element, which is impossible. 


Let me include an example of compactness which is a bit farther away from analysis and geometry. Given a set $F = \{ \phi_i \}$ of symbols of prepositions, assume that you form some composed prepositions connecting those with the symbols $\wedge$, $\vee$, $\neg$ and parenthesis (let me be not really precise here). A valid concatenation is for instance $(\phi \vee \psi) \wedge (\neg \rho)$. Take any set $X$ of composed propositions. We say that $X$ is noncontradictory if one can assign a truth value to all $\phi_i$ in such a way that, using ordinary rules for connectives, all sentences in $X$ are true.
The proof is simple. The set of possible choices for truth values is just $Y = \{0, 1\}^F = \prod_{\phi_i \in F} \{0, 1 \}$. Topologize $Y$ with the product topology, using the discrete topology on $\{0, 1\}$. Then $Y$ is compact by Tychonoff's theorem. For each composed preposition $\psi \in X$, the set $\{\psi \text{ is true} \}$ is a finite intersection of closed subset, hence a closed subset of $Y$. The hypothesis says that the intersection of finitely many of these closed sets is nonempty; by compactness, the intersection of all these closed subsets is not empty, which is the thesis. 


As a generalization of "compact + discrete => finite", we have "locally compact + linear => finite dimensional," which supplies a lot of nogo theorems in functional analysis. For instance, compact operators on infinitedimensional spaces can't be invertible. 


Compactifications were mentioned in general above... but I think this might be worth mentioning. The StoneCech compactification $\beta$ is used all the time since it produces a compact Hausdorff space from an arbitrary space in the "most efficient way." Just looking at applications of $\beta$ might be a more pointed question than asking about the wide world of compactness. $\beta$ is used frequently in topological algebra since the topological structure of universal algebras on noncompact spaces is often highly complicated. Specifically, it is used in Applications of the StoneCech compactification to free topological groups to give extremely short proofs of some important results in the study of free topological groups. The original proof of Joiner's Fundamental Lemma is rather long and complicated. The paper by Hardy, Morris, and ThomasSmith I have linked here (sorry if you don't have free access to this) gives a two page proof. One can also prove some nice embedding theorems for topological groups in just a few lines using $\beta$. To see some more applications of $\beta$ to topological groups see Arhangel'skii and Tkachenko's book. 


As a special case of coudy's first answer, compactness is commonly used in calculus of variations to show existence of a maximizer (or minimizer). Suppose we have some collection $X$ of functions, a continuous functional $E : X \to R$, and we know $M :=\sup_{f \in X} E[f] < \infty$. So for each $n$ there is a function $f_n$ with $E[f_n] \ge M1/n$, but we do not know if there is a function $f$ with $E[f] = M$. If $X$ is compact in an appropriate topology, $f_n$ will have a convergent subsequence $f_{n_k} \to f$, and the limit $f$ of this subsequence must have $E[f] = M$. The ArzelaAscoli theorem is a good example of a way to obtain the compactness. 


Gordan's lemma is another application of "compact + discrete => finite", but it is one of the basic building blocks of the theory of toric varieties.
In some sense the theory of division by polynomials (i.e. the Gröbner basis theory) is a manifestation of compactness, e.g. Dickson's lemma can be stated and proved as an application of compactness, see e.g. the wikipedia entry. I guess this is an example of the principle mentioned in the answer of Michael Greinecker. 


Every scheme, whose underlying space is hausdorff and compact, is affine. ;) [This answer is just for amusement] 

