I have found the following definition of morphism.
Let $X,Y$ be two varieties. A mapping $\phi:X\rightarrow Y$ is said to be morphism if
- $\phi$ is continuous.
- For each open set $U$ of $Y$ and $f\in \Gamma(U,\mathscr O_Y)$ (that's $f$ is a rational function defined on $U$) we have $f\circ \phi\in \Gamma(\phi^{-1}(U),\mathscr O_X)$.
My question is the following : if $f$ is defined over $U$ the certainly $f\circ \phi$ is defined over $\phi^{-1}(U)$, i.e. second condition in definition is superfluous. Am I right?
The second condition is saying that $f \circ \phi$ is a section of the sheaf of regular functions $\mathcal O_X$ over $\phi^{-1} (U)$. So the key point is that $f \circ \phi$ must be a regular function.
For example, the function $\phi : \mathbb A_{\mathbb C}^1 \to \mathbb A_{\mathbb C}^1$ sending $z \mapsto \bar z$ (the complex conjugate) is continuous with respect to the Zariski topology, but it is not a morphism of varieties. Indeed, take $f(z) = z^{123} + 456z$; this is a section of $\mathcal O_{\mathbb A_{\mathbb C}^1}$, defined on $U = \mathbb A_{\mathbb C}^1$, and note that $f \circ \phi (z) = \bar z^{123} + 456 \bar z$ is not a section of $\mathcal O_{\mathbb A_{\mathbb C}^1}$ over $\phi^{-1}(U) = \mathbb A_{\mathbb C}^1$.