Theorem : $A$ regular function is continuous, when $k$ is identified with $\mathbf{A}_{k}^{1}$ in its Zariski topology.
PROOF. It is enough to show that $f^{-1}$ of a closed set is closed. A closed set of $\mathbf{A}_{k}^{1}$ is a $ \color{red} {finite}$ set of points, so it is sufficient to show that $f^{-1}(a)=$ $\{P \in Y \mid f(P)=a\}$ is closed for any $a \in k .$ This can be checked locally: a subset $Z$ of a topological space $Y$ is closed if and only if $Y$ can be covered by open subsets $U$ such that $Z \cap U$ is closed in $U$ for each $U .$ So let $U$ be an open set on which $f$ can be represented as $g / h$, with $g, h \in A,$ and $h$ nowhere 0 on $U .$ Then $f^{-1}(a) \cap U=\{P \in U \mid g(P) / h(P)=a\} .$ But $g(P) / h(P)=$ $a$ if and only if $(g-a h)(P)=0 .$ So $f^{-1}(a) \cap U=Z(g-a h) \cap U$ which is closed. Hence $f^{-1}(a)$ is closed in $Y$
why a closed set of $\mathbf{A}_{k}^{1}$ is $ \color{red} {finite}$ ? is every finite set in $\mathbf{A}_{k}^{n}$ ,close ? also why a subset $Z$ of a topological space $Y$ is closed if and only if $Y$ can be covered by open subsets $U$ such that $Z \cap U$ is closed in $U$ for each $U$ ?
Because Zariski topology on $\Bbb A^1_k$ is the cofinite topology.
Yes, finite subsets are closed in $\Bbb A^n_k$ because Zariski topology is T1.
If $\mathcal U\subseteq \tau$, $\bigcup \mathcal U=Y$ and $Z\cap U$ is closed in $U$ for all $U\in \mathcal U$, then $$Z=Y\setminus\left(\left(\bigcup_{U\in\mathcal U}U\right)\setminus Z\right)=Y\setminus\bigcup_{U\in\mathcal U}(U\setminus Z)$$ We've established that $U\setminus Z$ is open in $U$. Since $U$ is open, this means that $U\setminus Z$ is open $Y$. Therefore $Z$ is closed.