The concept of scheme mimics the concept of manifold obtained by gluing pieces isomorphic to open balls, but with different "basic" gluing pieces. Properly, a scheme is a locally ringed space locally isomorphic (in the category of locally ringed spaces) to an affine scheme, the spectrum of a commutative ring with unit.

An *affine scheme* $X$ is a locally ringed space that is isomorphic to $\mathrm{Spec}R$, which is the spectrum of a commutative ring $R$. That is, for our commutative ring $R$, the closed subsets of $X$ correspond to the ideals of $R$, with the points of $X$ corresponding to prime ideals. Then $X$ being a locally ringed space means that it's equipped with a structure sheaf $\mathcal{O}_X$ that assigns to each open set $U$ the ring of regular functions on $U$.

A *scheme* then, is a locally ringed space that admits a open covering $\{U_i\}$ such that each $U_i$ is an affine scheme.