An affine morphism of schemes is a relative version of an affine scheme: given a scheme , the canonical morphism is affine iff is an affine scheme. By the basics of spectra, every morphism of affine schemes corresponds to a morphism of rings. The affine morphisms of general schemes are defined as the ones which are locally of that form:
A seemingly stronger, but in fact equivalent, characterization follows: is affine iff for every affine , the inverse image is affine.
Grothendieck constructed a spectrum of a (commutative unital) algebra in the category of quasicoherent -modules. The result is a scheme over ; relative schemes of that form are called relative affine schemes.
Now notice that a map of (associative) rings, possibly noncommutative (and possibly nonunital), induces an adjoint triple of functors among the categories of (say left) modules where is the extension of scalars, the restriction of scalars and where the latter is an -module via . In particular, is exact.
In fact, if is a quasicompact morphism of schemes and is separated, then is affine iff it is cohomologically affine, that is, the direct image is exact (Serre's criterion of affineness, cf. EGA II 5.2.2, EGA IV 1.7.17).
An affine localization is a localization functor among categories of quasicoherent -modules which is also the inverse image functor of an affine morphism; or an abstraction of this situation.
See also monad in algebraic geometry.
One can extend the notion of an affine morphism to algebraic spaces, the noncommutative schemes of Rosenberg, Durov’s generalized schemes, algebraic stacks and so on. The affinity is a local property so for algebraic stacks and the like one looks at the pullback to affine charts and checks if the resulting morphism is affine; for Durov’s and Rosenberg’s schemes one is basically generalizing the functorial criterium by definition. (more on this later)
Some of the material is extracted from MathOverflow http://mathoverflow.net/questions/15291/affine-morphisms-in-different-settings-coincide/58486.