We will understand schemes through the sheaf of functions on a space. We define schemes in terms of three pieces of data:

The set: the points of the scheme.

The topology: the open sets of the scheme.

The structure sheaf: the sheaf of algebraic functions, or a sheaf of rings, on the scheme.
In the key example of affine complex variety (roughly, things cut out in by polynomials), the set is the set of "traditional points" that are ntuples of complex numbers, plus some handy additional points. For the topology, we will require that the "subset of points where the function vanishes" to be closed. For the structure sheaf, we have algebraic functions on the open space consisting of points where the denominator does not vanish.
As a first example, consider differentiable manifolds. Taking to be a differentiable manifold, we see that it has a topology, and a sheaf of differentiable functions . This gives the structure of a ringed space. Evaluation at a point gives a surjective map from the stalk to :
so the kernel, the germs of functions vanishing at , is given by the maximal ideal .
We could define a differentiable manifold as a topological space with a sheaf of rings. We would require that there is an open cover of by open sets, such that on each open set, the ringed space is isomorphic to a ball around the origin in . With this definition, the ball is the basic patch, and the manifold is obtained by gluing patches together. The basic patch gives rise to the notion of an affine scheme, which will be discussed shortly. Functions are determined by their values at points, but this won't be true for schemes in general.
To discuss differentiable maps between manifolds , we first note that they are continuous maps; differentiable functions pull back to differentiable functions. More formally, we have . The inverse image map is left adjoint to the pushforward, so we also get a map .
Certainly, given a differentiable map of differentiable functions, differentiable functions pull back to differentiable functions. This is a sufficient condition for continuous functions to be differentiable.
Manifolds are covered by disks that are all isomorphic, but this isn't true for schemes. As an example, consider two "smooth complex varieties", the algebraic equivalent of Riemann spaces, where no nonempty open subset of is isomorphic to a nonempty open subset of . Informally, this is because in Zariski topology all nonempty open subsets are "huge" and have more structure.
Just as we have the example of differentiable manifolds in differential geometry, we have the example of continous functions in topology, and complex manifolds with functions holomorphic functions in complex geometry.
Underlying set of affine schemes
We will first define to be the prime spectrum of ring , the set of all prime ideals of . Later, we will endow it with topology, and define a structure sheaf on it, yielding an affine scheme. The prime ideal of , when considered as an element of , will be denoted by . Elements will be called functions on , and their value at point will be .
An element of the ring lying in a prime ideal translates to a function vanishing at point . If we add or multiply two functions, we add or multiply their values at all points; this is a direct consequence of being a ring homomorphism. If is generated over a base field or base ring by elements , these elements are called coordinates.
We will interpret functions on as global sections on the structure sheaf; i.e. a function on a ringed space. The notion of "value of a function" will later be interpreted as values on a particular locally ringed space.
As a first example, consider the complex affine line . Since is an integral domain, is a prime ideal. is a prime ideal too, and it is maximal, since quotient by this ideal gives a field:
There are no other prime ideals. In the geometric picture, there is one "traditional point" for each plus one bonus point . will readily associate to , but is mysterious, for it lies somewhere on the complex line, but nowhere in particular: we will call it a "generic point".
To get some intuition for this space, note that functions of are just polynomials in a single variable. Its value at is ; equivalently, we can evalute . Its value at is simply .
is defined everywhere but at ; as we will see later, it is an element of the structure sheaf on the open set . has a triple zero at , and a single pole at .
Example 2: over algebraically closed is the affine line over .
Example 3: , which looks a lot like , is a unique factorization domain with prime ideals . has a double pole at and a triple zero at .
Example 4: where is a field is boring: it a single one point, and has no prime ideals.
Example 5: is the affine real line. It is a Eucledian domain with prime ideals for , and for irreducible quadratics . Note that , and . As points, we have the usual real numbers, the generic point , and complex conjugates from the roots of the irreducible quadratic. Consider the function on this space. Its value at is , and .
Example 6: is the affine line over . is a Eucledian domain with prime ideals and , irreducible polynomials of any degree . Irreducible polynomials correspond to Galios conjugates . Note that has points in the corresponding , but has infinitely many more determined by .
Example 7: The affine complex plane is not a principal ideal domain. Its prime ideals are with irreducible. The points of are therefore traditional points corresponding to , generic point corresponding to , plus bonus points: for instance, lies everywhere on , but nowhere in particular. The prime ideals are of dimension , for irreducible are of dimension , and is of dimension . Notice that maximal ideals correspond to the smallest points: in general, containment between two ideals is reversed when considering containment of the corresponding points.
Example 8: The complex affine space has prime ideals when corresponding to traditional points, since the residue ring is the field . These are the only maximal ideals, by Hilbert's Nullstellansatz; it states, in the the weak version, that in for an algebraically closed field, the only maximal ideals are .
The strong version of the Nullstellansatz states that, for any field , every maximal ideal of has as residue field, a finite extension of . In other words, any field extension of finitely generated as a ring is also finitely generated as a module.
The maximal ideals of are prime ideals of dimension . For dimension , take for irreducible polynomial . Prime ideals of dimension are trickier, and cannot be organized in any useful way; take as an example: , an integral domain.
The fact that points of correspond to maximal ideals in ring , called "closed points", can be interpreted as points of where Galios conjugates are glued together extends to . For example, is glued to , but not to .
The two natural ways of getting new rings from old, quotients and localizations, have interpretation in terms of spectra:

Quotients. is a subset of . Prime ideals of are in bijective correspondence with prime ideals of containing . Consider the picture of affine complex varieties. Suppose is a finitely generated algebra, generated by with the relations
This gives us an interpretation of as a subset of , which we think of as "traditional points" along with some "bonus points" not yet fully described. To obtain the traditional points, simply solve . The entire picture carries over, along with the Nullstellansatz, when is replaced by any algebraically closed field.

Localizations. is a subset of . There are two important flavors of localization, namely for and . If , the prime ideals of are just those where does not vanish, and we will call this a distinguished open set. For instance, is pictured as the affine plane with points on thrown out; i.e. points for , by which we mean , as well as a "new kind of point" . is noninjective, and this may lead to some confusion. For instance, take with . We end up with an isomorphism . For , prime ideals of are just those prime ideals of contained in . For example, setting in , we get "things" through origin; indeed, the zerodimensional points , the twodimensional point , and the onedimensional points for which ; i.e. irreducible curves through origin. As an important example, consider and , or any maximal ideal. Then is the germ of a "smooth curve" where one point is a "classical point", and another is a "generic point" of the curve. This is an example of a discrete valuation ring.
Therefore, maps of rings induce maps of spectra.
In an algebraically closed affine variety, the translation between maps given by explicit functions and maps of rings is quite direct. For example, consider the parabola in given by and the parabola in given by . Suppose that the map sends the point to the point . In our new language, we have the map:
given by:
Now, we turn our attention to functions not determined by their values at points: the failure of nilpotents. A nonzero function may vanish at all points. Any function whose power is zero necessarily lies in the intersection of all prime ideals. The nilradical is the intersection of all prime ideals. To specify exactly when our intuition fails, two functions have the same value at two different points iff they differ by a nilpotent. Geometrically, a function vanishes at all points in a ring spectrum iff a power of it is . A ring with no nonzero nilpotents is termed reduced.
Visualizing schemes: generic points
We will understand rings as geometric objects through the functor: it will require us to define the underlying topology of schemes first. In a classical topology, we have visualized "traditional points" in an algebraically closed field as points of the scheme, but "generic points" and nonreduced behavior gives us some trouble; in fields that are not algebraically closed, traditional points are glued together by Galios conjugation. This is the geometric interpretation of Hilbert's Nullstellansatz.
The nontraditional points in the picture correspond to "closed" "irreducible" algebraic subsets. Each closed irreducible subset has a generic point sitting in it.
We have also seen how points of should be visualized as subsets of ; should be interpreted as a line in the plane. Similarly, points of should be interpreted as subsets of ; are the subset of points of where does not vanish: these will be formalized as distinguished open sets. If is a prime ideal, points of should be seen as a "shred of the space near the subset corresponding to ".
Underlying topological space of an affine scheme
The locus where a polynomial vanishes should be a closed set. The Zariski topology says that the only closed sets we should consider are these sets, and other sets that are forced to be closed by these; in other words, it is the coarsest topology in which the locus where a polynomial vanishes is a closed set. We define the vanishing set of by:
It is the set of points where all elements of vanish (or equivalently, are contained in a prime ideal).
Consider
The points in this vanishing set can be obtained by solving , yielding traditional points corresponding the plane, corresponding to the axis, and generic points and . We also have a bunch of onedimensional points contained in the plane.
We define the Zariski topology by declaring that is closed for all . The function is obviously inclusionreversing, for if , then . Moreover, since
we get
A couple of uninteresting examples follow. Consider the Zariski topology on : the closed sets correspond to maximal ideals and the generic point . Open sets are the empty set and points of minus the maximal ideals. The case of is similar: the open sets are the empty set and all points minus a finite number of , where is prime.
Next, consider the Zariski topology on . The prime ideals of , or the points of were previously identified to be , for , and where is an irreducible polynomial. Hence, the closed subsets in its Zariski topology are:

The entire space, obtained as a closure of the twodimensional point .

A number of "curves", obtained as a closure of onedimensional points (along with the zerodimensional points lying on them).
Maps of rings induce continuous maps on topological spaces. Map of rings induces the map on topological spaces. Not all continuous maps arise in this way; for example, consider which is identity, except that points and are swapped: no polynomial can achieve this feat.
We saw that and were subsets of . The Zariski topology behaves well with respect to these inclusions. In particular, if is an ideal of nilpotents, then is a homeomorphism. Thus, nilpotents do not affect the topological space.
Distinguished open sets
We define the distinguished open set to be:
That is, the locus where does not vanish. Informally, this is the doesn'tvanishset, analogous to the terminology we used for vanishing set . The Zariski topology on the distinguished open set coincides with the Zariski topology on . Distinguished open sets form a nice base for the Zariski topology.
Inside , we have the closed set , where vanishes, and its complement where does not vanish. Then is a function on the closed subset , and by assumption, it vanishes on all points of the closed subset. We have already seen that any function vanishing at every point in the spectrum of a ring must be nilpotent.
Topological and Noetherian properties
Topolgical properties of the underlying space which are useful especially when we carry them over to schemes are:

Connectedness. A topological space is said to be connected if it cannot be written as a disjoint union of two nonempty open sets. is not connected iff it is isomorphic to the product of two nonzero rings . The key idea to show that this is an equivalent condition, is there existing nonzero for which
yielding .

Irreducibility. A topological space is said to be irreducible if it is nonempty, and cannot be written as the union of two proper closed subsets. In other words, is irreducible iff
The notion isn't useful in classical geometry; for example, is reducible, but is irreducible.

Quasicompactness. A topological space is said to be quasicompact, if given any open cover , there exists a subset of index set such that . Informally, every open cover has a finite subcover. We can think of this condition as compactness minus the Hausdorff condition, but it isn't really the algebrogeometric analog of "compact", since we wouldn't want to be compact: the right analog is "properness", which we will define much later.
A point is termed as a closed point if the subset is closed. In classical topology all points are closed, while in and , all points except are closed. The Nullstellansatz lets us interpret closed points of as the maximal ideals in . Henceforth "traditional points" will be called closed points, and "bonus points" will be called nonclosed points when discussing .
We now make precise the notion of one point contained within the closure of another point. is termed as a specialization of , and is termed as the generalization of if . For example, in , is a generalization of .
We say that is a generic point for a closed subset if . If something is "generically" or "mostly" true for points in an irreducible subset, in the sense of being open for a dense open subset, then it is true of a generic point and viceversa. For example, a function has value in an integral scheme iff it has the value at all points. The phrase general point does not have the same meaning: something being true for a general point means that it is true for all points in a dense open subset of . We will soon see that there is a natual bijection of the points of and irreducible closed subsets of , sending each point to its closure, and each irreducible closed subset to its unique generic point.
An irreducible component of a topological space is a maximum irreducible subset; i.e. an irreducible component is not contained in a larger irreducible subset. Irreducible components are closed, as closure of irreducible subsets are irreducible. We think of the irreducible components of as maximal among the irreducible closed subsets of . Similarly, a connected component of a toplogical space is a maximum connected subset. Every topological space is the union of irreducible components. Similarly, every point is contained within a connected component, and connected components are always closed. On the other hand, connected components need not be open: as an example, consider .
Spaces can be broken up into a finite number of irreducible components. For example, in the locus of , we think of the space as having two "pieces": the and axes. The reason for this is that the underlying topological space is Noetherian. In particular a topological space is said to be Noetherian if it satisfies the descending chain condition for closed subsets.
If is a Noetherian topological space, then every nonempty subset can be expressed as a finite union of irreducible subsets: , none contained in the other. To prove this, we will use the technique of Noetherian induction. Consider the collection of closed subsets of which cannot be expressed as a finite union of irreducible closed subsets. Let be one such, and let it contain another such, call it . If contains another such, call it , and so on. By the d.c.c, this sequence must eventually stop, so let it stop at some , which cannot be written as a finite union of irreducible closed sets; moreover, every closed subset contained in it can be so written. But is not irreducible, so we can write , where are proper closed subsets. By hypothesis, both of these can be written as a finite union of closed irreducible sets, and hence so can , leading to a contradiction. Next we show uniqueness; let:
be two such representations. Then,
so,
Since is irreducible, one of these is equal to itself; say without loss of generality. Thus for some . But hypothesis, is not contained in any other , leading to . Hence, , and induction completes the proof.
It turns out that all the spectra we have considered are Noetherian topological spaces, but this isn't true of spectrum of all rings. A ring is Noetherian if the ideals satisfy ascending chain condition. Some trivial properties of Noetherian rings are:

Fields are Noetherian, as is .

Noetherianness is preserved by quotients.

Noetherianness is preserved by localizations.
Hence, any finitely generated algebra over or is Noetherian. Example of a nonNoetherian ring: , since the sequence of ideals does not terminate.
Hilbert's Basis Theorem: If is Noetherian, so is . To prove this, we show that any ideal is finitelygenerated. We inductively produce a set of generators as follows. For if , let be a nonzero element of lowest degree. Thus, is an element of of lowest degree, assuming . If this procedure terminates, then we are done. Otherwise, let be an initial coefficient of for . Then, as is Noetherian, for some . Let . Then,
is an element of that is nonzero, and of lower degree than , leading to a contradiction.
All Noetherian rings yield Noetherian topological spaces, but the converse is not true. For instance, consider
Then is one point, so is Noetherian, but is not Noetherian because
If is a ring, not necessarily Noetherian, we say that the module is a Noetherian module if it satisfies the a.c.c for submodules.
The function
We introduce, in some sense, the "inverse" of function . Given , is the set of functions vanishing on . In other words, , atleast when is nonempty. We make the following trivial observations:

is an ideal.

is inclusion reversing.

.
and give an inclusionreversing bijection between closed subsets of and radical ideals of , where closed subset gives a radical ideal by , and radical ideal gives closed subset by .
Note that is always a radical ideal: if , then vanishes on for some , hence vanishes on and .
A prime ideal is called a minimal prime if it is minimal with respect to inclusion. For example, the only minimal prime ideal of is . A Noetherian ring has a finite number of minimal prime ideals.