I want to verify my understanding.
I am working with Hartshorne definitions, in particular a variety is either affine, quasi-affine, projective, or quasi-projective.
A morphism is one that sends regular functions to regular functions.
Explicitly saying what morphisms are:
- A map to an affine $Y$ is a morphism iff each component is a regular function
- A map to a quasi-affine $Y$ is a morphism iff each component is a regular function
- A map to a projective $Y$ is a morphism iff if on $U_i \cap Y$, normalizing the ith coordinate to be $1$, the rest are regular
- A map to a quasi-projective $Y$ is a morphism iff if on $U_i \cap Y$, normalizing the ith coordinate to be $1$, the rest are regular
The proof to all of these is just explicitly saying that composing with a regular function gives again an appropriate regular function (one has to divide to cases based on the preimage being affine or projective).
As I said in comments: If you think of varieties as locally ringed spaces then a morphism $$(f,f^\sharp): (X,\mathcal{O}_X) \to (Y,\mathcal{O}_Y)$$ is the data of both a continuous map $f : X\to Y$ and a morphism of sheaf $f^\sharp : \mathcal{O}_Y \to f_*\mathcal{O}_X$.
In the case of a (let's say affine) variety $X=V(P)$ for $P\in K[X_1,\dots,X_n]$, the sheaf $\mathcal{O}_X$ is associated to $K[X_1,\dots,X_n]/(P)$, that is the regular functions on $X$. Hence the component $f^\sharp$ is just precomposition by $f$, thus we find back the condition "regular functions are sent to regular functions".