I've read from some lecture notes that the idea to define morphisms is that a variety $X$ is completely determined by the regular functions on all open subsets of $X$, so a morphism should preserve regular functions on open subsets.
How can I see that a variety is completely determined by the regular functions on all open subsets?
By definition a variety is an irreducible algebraic set, so it is the zero set of some polynomials. What is the relation between this and the regular functions?