An affine scheme is a scheme that as a sheaf on the opposite category CRing of commutative rings (maybe finitely presented one) is representable. In a ringed space picture an affine scheme is a locally ringed space which is locally isomorphic to the prime spectrum of a commutative ring.