Given $\phi:C(X)\rightarrow C(Y)$ for each point $y\in Y$, we have the composite homomorphism $$\phi_y: C(X)\rightarrow C(Y)\xrightarrow{g\mapsto g(y)}\mathbb C$$ $$\phi_y(f):=\phi(f)(y)$$
is a character of $C(X)$, hence $\phi_y(f) = f(x)$ for some $x\in X$.
(Note that any character is automatically bounded, which is part of the theory of the Gelfand transform for Banach algebras, even though we haven't established $\phi$ is continuous.)
This defines a map $\rho: Y\rightarrow X$, and $\phi$ is the induced map $\phi(f)=f\circ \rho$.
So far it's all abstract nonsense, and there are a couple of different ways to finish:
The simplest is to recognize from $\phi(f)=f\circ\rho$, $\phi$ preserves involution (complex conjugate of functions), and then apply the theorem about $C^*$-algebras you cited.
Here is a more concrete approach. Since the range of $\phi(f)$ is a subset of the range of $f$, immediately $$\|\phi(f)\|_{\infty}\le\|f\|_{\infty}$$ We claim that the image of $\rho$ is dense in $X$, otherwise, pick $x_0$ that is not in the closure of $\text{Im}(\rho)$, by Tietze extension theorem, there is a function $f\in C(X)$ such that $f|_{\overline{\text{Im}\rho}}=0$ and $f(x_0)=1$, then $\phi(f)=f\circ \rho = 0$, while $f\not=0$, hence $\phi$ is not injective. Now given any $f\in C(X)$, assume $\|f\|_{\infty}$ is achieved at $x_0$, i.e. $|f(x_0)|=\|f\|_{\infty}$.
For any $\epsilon>0$, since $x_0\in\overline{\text{Im}(\rho)}$, $f^{-1}(B(f(x_0), \epsilon)\cap \text{Im}(\rho)\not=\emptyset$, assume $\rho(y)\in f^{-1}(B(f(x_0), \epsilon)$, we have $$|(f\circ \rho)(y)-f(x_0)|<\epsilon$$ $$\|\phi(f)\|_{\infty}\ge |(f\circ\rho)(y)|\ge |f(x_0)|-\epsilon=\|f\|_{\infty}-\epsilon$$
let $\epsilon\rightarrow 0$, we get $\|\phi(f)\|_{\infty}\ge \|f\|_{\infty}$.
If we are allowed to use $\rho$ is continuous, then $\text{Im}(\rho)$ is compact and also dense hence $\rho$ is surjective. This can be used to avoid the approximation argument above. To show $\rho$ is continuous, we may use the fact that the topology on $X$ is the weak topology induced by $C(X)$. That is $$\{U_{f, c, \epsilon}:=f^{-1}(B(c,\epsilon)) \mid f\in C(X), c\in\mathbb C, \epsilon>0\}$$ generate the topology of $X$, and since $f\circ\rho$ is continuous over $Y$, we have $\rho^{-1}(f^{-1}(B(c,\epsilon))=\rho^{-1}U_{f, c, \epsilon}$ is open in $Y$.
Remark: There "are" Banach algebra homomorphisms that are not continuous.