[proofplan]
We construct $\beta X$ by embedding $X$ into the product cube $[0,1]^{C(X,[0,1])}$ using all continuous real-valued functions and taking the closure of the image. Complete regularity makes this evaluation map a topological embedding, while [Tychonoff's theorem](/page/Tychonoff's%20Theorem) makes the ambient cube compact. For a continuous map $f: X \to K$, we embed $K$ into its own function cube and use the coordinate functions $b \circ f$ for $b \in C(K,[0,1])$ to define a continuous map from $\beta X$ into that cube; closedness of the embedded copy of $K$ forces the image to land in $K$. Density of $\eta_X(X)$ gives uniqueness.
[/proofplan]
[step:Embed $X$ into the cube of its continuous $[0,1]$-valued functions]
Let $I := [0,1]$ with its usual compact Hausdorff topology, and define the indexing set
\begin{align*}
A := C(X,I).
\end{align*}
Let
\begin{align*}
P_X := \prod_{a \in A} I
\end{align*}
with the [product topology](/page/Product%20Topology). By [Tychonoff's theorem](/theorems/953) (citing a result not yet in the wiki: Tychonoff theorem), $P_X$ is compact. Since each factor $I$ is Hausdorff, the product $P_X$ is Hausdorff.
Define the evaluation map
\begin{align*}
e_X: X &\to P_X \\
x &\mapsto (a(x))_{a \in A}.
\end{align*}
For every $a \in A$, the coordinate projection
\begin{align*}
\pi_a: P_X &\to I \\
(p_b)_{b \in A} &\mapsto p_a
\end{align*}
satisfies $\pi_a \circ e_X = a$, hence $e_X$ is continuous by the defining property of the product topology.
We claim that $e_X$ is a topological embedding. If $x,y \in X$ with $x \neq y$, then $\{y\}$ is closed because $X$ is Hausdorff. Complete regularity gives a continuous map $a \in C(X,I)$ such that $a(x)=1$ and $a(y)=0$. Thus $e_X(x) \neq e_X(y)$, so $e_X$ is injective.
It remains to check that the topology on $X$ is the [subspace topology](/page/Subspace%20Topology) induced by $e_X$. Let $U \subset X$ be open and let $x \in U$. Put $F := X \setminus U$, which is closed in $X$. Complete regularity gives $a \in C(X,I)$ such that $a(x)=1$ and $a(F)\subset \{0\}$. Then
\begin{align*}
x \in a^{-1}((1/2,1]) \subset U,
\end{align*}
and $(1/2,1]$ is open in the subspace topology of $I$. Since
\begin{align*}
a^{-1}((1/2,1]) = e_X^{-1}\left(\pi_a^{-1}((1/2,1])\right),
\end{align*}
the original topology on $X$ is generated by inverse images of open subsets of $e_X(X)$. Therefore $e_X: X \to e_X(X)$ is a homeomorphism.
[/step]
[step:Define $\beta X$ as the compact closure of the evaluation image]
Define
\begin{align*}
\beta X := \overline{e_X(X)} \subset P_X,
\end{align*}
where the closure is taken in $P_X$, and define
\begin{align*}
\eta_X: X &\to \beta X \\
x &\mapsto e_X(x).
\end{align*}
Since $P_X$ is compact Hausdorff and $\beta X$ is closed in $P_X$, the space $\beta X$ is compact Hausdorff. Since $e_X$ is a topological embedding, $\eta_X$ is a continuous embedding. By definition of $\beta X$ as the closure of $e_X(X)$, the image $\eta_X(X)$ is dense in $\beta X$.
[/step]
[step:Embed the compact Hausdorff target $K$ into its own function cube]
Let $K$ be a compact [Hausdorff space](/page/Hausdorff%20Space). Define
\begin{align*}
B := C(K,I), \qquad P_K := \prod_{b \in B} I.
\end{align*}
Define the evaluation map
\begin{align*}
e_K: K &\to P_K \\
y &\mapsto (b(y))_{b \in B}.
\end{align*}
The same coordinate-projection argument shows that $e_K$ is continuous.
Because every compact Hausdorff space is completely regular by [Urysohn's lemma](/theorems/887) (citing a result not yet in the wiki: Urysohn lemma for compact Hausdorff spaces), the functions in $C(K,I)$ separate points and generate the topology of $K$. Hence $e_K$ is a topological embedding. Since $K$ is compact and $P_K$ is Hausdorff, $e_K(K)$ is compact and therefore closed in $P_K$, and
\begin{align*}
e_K: K \to e_K(K)
\end{align*}
is a homeomorphism.
[/step]
[step:Construct the extension of $f$ by pulling back coordinates]
Let
\begin{align*}
f: X \to K
\end{align*}
be continuous. For each $b \in B$, define
\begin{align*}
a_b: X &\to I \\
x &\mapsto b(f(x)).
\end{align*}
Since $b$ and $f$ are continuous, $a_b \in A$.
Define
\begin{align*}
R_f: P_X &\to P_K \\
(p_a)_{a \in A} &\mapsto (p_{a_b})_{b \in B}.
\end{align*}
For each $b \in B$, the $b$-coordinate of $R_f$ is the coordinate projection $\pi_{a_b}$ on $P_X$, so $R_f$ is continuous by the product topology. For every $x \in X$,
\begin{align*}
R_f(\eta_X(x))
&= R_f((a(x))_{a \in A}) \\
&= (a_b(x))_{b \in B} \\
&= (b(f(x)))_{b \in B} \\
&= e_K(f(x)).
\end{align*}
Thus
\begin{align*}
R_f(\eta_X(X)) \subset e_K(K).
\end{align*}
Since $\eta_X(X)$ is dense in $\beta X$, $R_f$ is continuous, and $e_K(K)$ is closed in $P_K$, it follows that
\begin{align*}
R_f(\beta X) \subset e_K(K).
\end{align*}
Define
\begin{align*}
\bar f: \beta X &\to K \\
z &\mapsto e_K^{-1}(R_f(z)).
\end{align*}
This map is continuous because $R_f|_{\beta X}$ is continuous and $e_K^{-1}: e_K(K) \to K$ is continuous. For $x \in X$,
\begin{align*}
\bar f(\eta_X(x))
&= e_K^{-1}(R_f(\eta_X(x))) \\
&= e_K^{-1}(e_K(f(x))) \\
&= f(x).
\end{align*}
Therefore $\bar f \circ \eta_X = f$.
[/step]
[step:Use density to prove uniqueness of the extension]
Let
\begin{align*}
g: \beta X \to K
\end{align*}
be a continuous map satisfying $g \circ \eta_X = f$. Then the two continuous maps
\begin{align*}
e_K \circ g,\ e_K \circ \bar f: \beta X \to P_K
\end{align*}
agree on $\eta_X(X)$, because for every $x \in X$,
\begin{align*}
(e_K \circ g)(\eta_X(x))
&= e_K(f(x)) \\
&= (e_K \circ \bar f)(\eta_X(x)).
\end{align*}
The set $\eta_X(X)$ is dense in $\beta X$, and $P_K$ is Hausdorff. Hence two continuous maps from $\beta X$ to $P_K$ that agree on $\eta_X(X)$ agree on all of $\beta X$. Therefore
\begin{align*}
e_K \circ g = e_K \circ \bar f.
\end{align*}
Since $e_K$ is injective, $g=\bar f$. This proves uniqueness and completes the proof of the universal property.
[/step]