TITLE: Grothendieck's relative point of view and Yoneda lemma
QUESTION [13 upvotes]: I asked this question on M.SE, but didn't get any answers.
Occasionally I hear people saying that one of Grothendieck's big insights was that often when interested in an object $X$ it's better to study morphisms into that object, $-\to X$. Apparently that's called the relative point of view.
First question. How is that principle applied in practice? What are some concrete examples in mathematics where the relative point of view is useful?
Wikipedia mentions the Riemann–Roch theorem and a similar MSE question mentions a theorem about coherent sheaves. Unfortunately, I don't know any algebraic geometry yet. Are there more down-to-earth applications of the relative point of view that an undergraduate can understand, say, in linear algebra, group theory, ring theory, Galois theory, or maybe even in basic category theory?
What are (some of) the most important theorems that feature the relative point of view?

I recently heard about the Yoneda lemma in category theory (I know the statement and can prove it). I know that it can be used to prove that two objects are isomorphic whenever they have the same universal property. In Awodey's category theory book, there's a concrete application of that: in categories with enough structure, $(A\times B)+(A\times C)\cong A\times (B+C)$. That proof is elegant, I agree. But it doesn't live up with the praise many people give to the Yoneda lemma, does it?
Maybe a more concrete application in non-category theory would help me to get convinced of the contrary. For instance, I read on Wikipedia (and elsewhere) that Grothendieck used the Yoneda lemma in his famous book EGA (which a lot of people seem to talk about). (In fact, it seems this was another insight of him: that Yoneda is useful.)
Second question. So what were Grothendieck's main applications of the Yoneda lemma in algebraic geometry? (In contrast to the first question, here it suffices for me to just know roughly what kind of statement he proved with the Yoneda lemma---rather than understanding it in detail, because I already know one application of the Yoneda lemma.)

Third question. Is the second question related to the first one, i.e., is there a connection between the relative point of view and the Yoneda lemma? (At least the Wikipedia page linked above mentions the Yoneda lemma.)

REPLY [11 votes]: There is a crucial aspect of the relative point of view that I think has not been completely covered here so far.
The relative point of view does not just mean that we want to look at morphisms. It says we want to look at morphisms as analogues of objects.
How does this analogy work? A space $X$ (for example a topological space, manifold, or scheme) has the same information as a map from $X$ to a point. So a map between two spaces is a generalization of a space, which we can think of as a family of spaces, the fibers, parameterized by the points of the target.
Families of spaces were certainly something people considered before Grothendieck, but a big part of the philosophy is to think of every morphism as a family of this type, even ones where the fibers are very different from each other.
One thing this means is that for every interesting property that a space can satisfy, there should be an analogous property that a morphism can satisfy. The relative point of view tells you to look for this, and to generalize theorems about the old property to theorems about the new.
There's many examples of this in scheme theory, but a more elementary field where the same insight applies is point-set topology.
For example, compact topological spaces are interesting. What could the generalization to morphisms be? It must be a property of maps $X \to Y$ of topological spaces which are satisfied when $Y$ is a point if and only if $X$ is compact. One can look at maps where the inverse image of every compact set is compact (which are at least sometimes called proper maps), or universally closed maps, i.e. maps where for every topological space $Z$, the image of every closed subset of $X \times Z$ inside $Y \times Z$ is also closed.