A character is a linear functional with some additional properties ($\varphi(a\cdot b) = \varphi(a)\varphi(b)$ and $\varphi(1) = 1$).
Then the fact that a linear functional $\lambda \colon E \to \mathbb{K}$ on a topological vector space $E$ over $\mathbb{K}\in \{\mathbb{C},\mathbb{R}\}$ is continuous if and only if its kernel is closed yields the continuity of characters (assuming the closedness of maximal ideals to have been established beforehand).
Since the singleton set $\{0\}$ is closed in $\mathbb{K}$, the closedness of $\ker\lambda = \lambda^{-1}(\{0\})$ is evidently necessary for the continuity of $\lambda$.
Conversely, if $\ker\lambda$ is closed, either $\lambda \equiv 0$, and $\lambda$ is continuous, or - since $\dim_{\mathbb{K}} \mathbb{K} = 1$, $\lambda$ is surjective or identically $0$ - there is an $a \in \lambda^{-1}(\{1\})$. Then $\lambda^{-1}(\{1\}) = a + \ker\lambda$ is closed (translations are homeomorphisms), and thus there is a neighbourhood $U$ of $0$ with $U \cap \lambda^{-1}(\{1\}) = \varnothing$. In a topological vector space, the balanced neighbourhoods of $0$ - the neighbourhoods $V$ of $0$ with $t\cdot V \subset V$ for all $t\in \mathbb{K}$ with $\lvert t\rvert \leqslant 1$ - form a neighbourhood basis of $0$, hence we can without loss of generality assume that $U$ is balanced. Then it follows that $\lambda(U) \subset D_1(0) = \{t \in \mathbb{K} : \lvert t\rvert < 1\}$, for if we had $\lvert\lambda(u)\rvert \geqslant 1$ for some $u\in U$, then $\lvert \lambda(u)^{-1}\rvert \leqslant 1$, and hence $\lambda(u)^{-1}\cdot u \in U$ by balancedness, and $\lambda(u)^{-1}\cdot u \in U \cap \lambda^{-1}(\{1\})$ is a contradiction.
This shows that $\lambda$ is continuous at $0$, and since it is linear, continuous everywhere.
The equivalence of having a closed kernel and being continuous does not carry over to general (ring) homomorphisms $f \colon R \to S$ where $R,S$ are topological rings (modules, groups ...). On the one hand, $S$ need not be Hausdorff, and then $\{0\}$ is not closed, whence $\ker f$ has no reason to be closed if $f$ is continuous (the identity certainly is continuous if we take the same topology on domain and codomain, and its kernel is closed if and only if the ring, module, group ... is Hausdorff). On the other hand, if we have two different Hausdorff topologies $\tau_1,\tau_2$ (compatible with the algebraic structure) os a ring, module, group ... $R$, then $\operatorname{id} \colon (R,\tau_1) \to (R,\tau_2)$ is not continuous unless $\tau_1$ is strictly finer than $\tau_2$, in which case $\operatorname{id} \colon (R,\tau_2)\to (R,\tau_1)$ is not continuous. Yet its kernel is $\{0\}$, which is closed by the Hausdorff property.
The equivalence of being continuous and having a closed kernel is particular to linear maps of $\mathbb{K}$ vector spaces with a finite-dimensional range (that carries a Hausdorff vector space topology). (There may be some other situations where the closedness of the kernel alone is enough to deduce continuity, but generally it is not.)