The book I'm reading says it is the same to consider:
(i) a morphism of schemes $f: X \to Y$;
(ii) a natural transformation $\alpha: h_X \to h_Y$, where $h$ is the functor that associates a scheme to its functor of points;
(iii) a natural transformation $\alpha': h'_X \to h'_Y$, where $h'_X, h'_Y$ are the restriction of the respective functors of points to the category of affine schemes.
So one may consider a scheme as a particular functor from $Rings = (AffSch)^{Opp}$ to $Sets$. I can see how (i) and (ii) are equivalent, because of Yoneda's Lemma. However, I'm having trouble to see how (iii) is sufficient for the other two. The author says it is because morphisms glue and affine schemes are a basis of the topology in a scheme, but this is not enough for me to grasp the idea, I guess.