regular and rational functions
Two kinds of functions live on a variety, and the difference is whether dividing is allowed. A regular function is one given, locally, by an honest polynomial — no denominators, defined everywhere on its open patch and behaving like a smooth quantity. A rational function is allowed a denominator, so it may be a perfectly good function on most of the variety but blow up or become undefined on a thin closed set. Regular is to rational as a polynomial is to a fraction.
Make this local. A function f on an open set U of a variety X is regular at a point p if near p it can be written as a ratio g/h of regular functions on the ambient space with h(p) not zero; on an affine variety the globally regular functions are exactly the elements of the coordinate ring k[X]. A rational function is an equivalence class of pairs (U, f) with f regular on a dense open U, two pairs identified when they agree on the overlap; these form the function field k(X). The crucial subtlety is the domain of definition: a rational function may have several representations as g/h, and it counts as regular at p if any one of them has nonvanishing denominator there, which can rescue points a single formula seems to forbid.
Together these notions make precise what a 'function' on a variety is and underpin morphisms and rational maps. The classic surprise: on a smooth projective curve the local pictures glue so well that a rational function regular at every point must be constant, and more generally the only regular functions on any irreducible projective variety are the constants. Caveat: never read off a rational function's domain from one formula. The function (x^2 - y^2)/(x - y) looks undefined on x = y but equals x + y wherever both are defined, hence extends regularly across that line — the apparent singularity was an artifact of the chosen representative.
On A^2 the rational function (x^2 - y^2)/(x - y) appears undefined along x = y. But it simplifies to x + y, which is regular everywhere. So the function is in fact regular on all of A^2; the line x = y was a removable apparent pole coming from one representative.
Regular at a point means SOME representative has nonvanishing denominator there; a single formula can lie about the domain.
Globally regular functions on an irreducible projective variety are only the constants. Richness lives not in global functions but in rational functions, sections of line bundles, and cohomology.