Definition
Scheme
A locally ringed space covered by open subsets that are affine schemes.
Definition
A scheme is a locally ringed space that has an open cover for which every restricted locally ringed space is an affine scheme.
In other words, a scheme is assembled by gluing prime spectra of commutative rings, while simultaneously gluing the algebraic functions carried by their structure sheaves.
How to read the definition
The topological space records how algebraic loci specialize and intersect. The sheaf records which functions are available on each open set, and its stalk at a point records functions defined near that point. The affine-cover condition says that all of this data is locally controlled by commutative rings.
Maps between schemes must preserve both layers of information. These are morphisms of schemes, not merely continuous maps of the underlying spaces.
Examples
Every affine scheme is a scheme, using the one-set cover. A field gives the one-point scheme , and the affine line is .
The projective space is generally not affine, but it is a scheme because it is covered by open subsets, each isomorphic to affine -space.