Ring homomorphisms between $C([0,1], \mathbb{R})$ and $C(\text{Cantor set},\mathbb{R})$ Let

*

*$K \subseteq [0,1]$ be the Cantor set.

*$C([0,1], \mathbb{R})$ be the ring of continuous functions from $[0,1]$ to $\mathbb{R}$.

*$C(K,\mathbb{R})$ be the ring of continuous functions from $K$ to $\mathbb{R}$.

Then, what can we say about the homomorphisms from $C([0,1], \mathbb{R})$ to $C(K,\mathbb{R})$ ?
How many of them are injective ?
How many of them are surjective ?
 A: Gelfand Duality says that the category of Compact Hausdorff Spaces $\mathsf{CompHaus}$ is antiequivalent to the full subcategory of rings of the form $C(X)$ for a compact hausdorff space $X$, $\mathsf{C^*Alg}$. Everything I'm about to say is well treated in chapter IV.4 of Johnstone's Stone Spaces, and you can read more about it there.
This antiequivalence is witnessed by the functors
$X \mapsto CX$, and if $f : X \to Y$ is a continuous map, $Cf : CY \to CX$ is given by composition with $f$. So $(Cf)(\phi) = \phi \circ f$.
$R \mapsto \text{MaxSpec}(R) = \{ \text{maximal ideals of $R$} \}$, where we equip the space of maximal ideals with the Zariski Topology. If $f : R \to S$ is a ring hom (preserving $1$) then
$\text{MaxSpec}(f) : \text{MaxSpec}(S) \to \text{MaxSpec}(R)$ is given by $\mathfrak{m} \mapsto f^{-1}(\mathfrak{m})$. It's not immediately obvious that the preimage of a maximal ideal in $S$ is maximal in $R$,
but it's true basically because $\mathbb{R}$ is finitely generated as an $\mathbb{R}$-algebra.
Now, it takes some showing that (for compact hausdorff spaces $X$ and rings $R$ of the form $C(X)$ for some such $X$)

*

*$\text{MaxSpec}(C(X)) \cong X$

*$C(\text{MaxSpec}(R)) \cong R$

*$\text{MaxSpec}(C(f)) "\cong" f$

*$C(\text{MaxSpec}(f)) "\cong" f$
where by $"\cong"$, I mean that the map $\text{MaxSpec}(C(f))$ is equal to $f$ when we compose on either side with the relevant isomorphisms $\text{MaxSpec}(C(X)) \cong X$ and $Y \cong \text{MaxSpec}(C(Y))$.

Now. Why should we care? Well, this duality tells us that for compact hausdorff spaces $X$ and $Y$, we have a (natural) bijection
$$
\big \{ \text{Continuous Maps } f : X \to Y \big \}
\longleftrightarrow
\big \{ \text{Ring Homs } \tilde{f} : C(Y) \to C(X) \big \}
$$
So then we get to your question. What can we say about the ring homomorphisms $C[0,1] \to CK$?
They're in bijection with continuous maps $K \to [0,1]$!
Moreover, any "categorical" property of these arrows is preserved (but dualized). So for instance, a homomorphism from $C[0,1] \to CK$ is surjective if and only if it's an epimorphism (this is actually non-obvious. See the (well named) Epimorphisms of C*-algebras are surjective by Hofmann and Neeb).
Now since epis are dual to monos, this happens if and only if the corresponding map $K \to [0,1]$ is a monomorphism, which happens if and only if it's injective.
So surjections $C[0,1] \to CK$ are in natural bijection with (continuous) injections $K \to [0,1]$.
Of course, you can use this machinery to answer lots of questions of the type you're interested in.

I hope this helps ^_^
