I think there are two important questions.
A. Why does it work?
When you have an object $A$, then you may think of any object $X$ as of a "perspective" from which the object $A$ is seen. Then a morphism $X \rightarrow A$ corresponds to a particular point of view from a given perspective $X$. In this sense, ordinary sets have one global perspective (a singleton, or a "terminal" set) that describes all aspects of a particular set --- namely morphisms $1 \rightarrow A$ correspond to the elements of $A$, and sets having the same elements are "the same". On the contrary in a category like $\mathbf{Grp}$, the global perspective says exactly nothing about objects.
Yoneda lemma works, because (in general) watching objects from all perspectives give you all (important, that is external) information about the objects. That is: $$\mathit{hom}(-, A) \approx \mathit{hom}(-, B) \Rightarrow A \approx B$$
B. What does it mean?
Almost everything, but I like, and do think is the most important, the following. You may think of a functor $F \colon \mathbb{C}^{op} \rightarrow \mathbf{Set}$ as of a kind of a generalized algebra over signature $\mathbb{C}$ --- objects of $\mathbb{C}$ correspond to "sorts" whereas morphisms to "operations"; then functor $F$ gives just an interpretation for every "sort" (a set), and for every morphism (a function between sets); it is easy to see that then natural transformations between such functors are generalizations of algebra homomorphisms in the usual sense.
Yoneda lemma says that every category can be thought as a full subcategory of generalized algebras over generalized signatures. Particularly, categories are given as merely generalized graphs satisfying some equations; thanks to Yoneda lemma, we may think of these abstract nodes (objects) as of "real structures" (algebras), and of edges (morphisms), as of "real functions" preserving that structures.
Put it another way. The standard mathematics starts from "elements" formed into structures. This is the "internal view". Then we define "mappings" that preserve structures, and we are (mostly) willing to forget about specific elements --- what becomes important is how these structures look from the perspective of "mappings" (for example, we do not want to distinguish isomorphic structures, despite the fact that their "elements" may be far different). This is the "external view".
So the standard mathematics starts from the "internal view" and then switches to the "external view", whilst category theory starts from the "external view" --- and due to Yoneda lemma --- we know that the "internal view" exists as well.
One may also say that the difference between the standard mathematics and category theory is just like the difference between Aristotelian physics and Galilean physics. Take for example the concept of velocity. In Aristotelian physics we may say that an object moves at a certain velocity (the concept of a velocity is an internal property of an object). By contrast, such a statement does not make any sense in Galilean physics --- in the later we may only say that an object moves at a certain velocity with respect to another object (the concept of a velocity is an external aspect of some objects, it is not a property of a single object). However, in Galilean physics, we may "internalize" the concept of velocity by saying what are the velocities of an object in respect to all possible objects (such a collection of velocities indexed by objects would be its internal property).