The way I view Yoneda's lemma as a generalization of Cayley's theorem is by viewing a group as a category with one object $A$. To see how a category with one element is a group, let the points of the group be morphisms $f:A\rightarrow A$. By the definition of a category, we must have an identity morphism $id_A:A\rightarrow A$, and this is the identity of the group. Similarly, morphisms are associative, so $f\circ (g\circ h) = (f\circ g)\circ h$. So composition is the group operation. As for invertibility, let's just force our morphisms to be invertible by assuming they are all isomorphisms. Ok, so now the collection of morphisms forms a group in the sense we learn in undergrad.

Cayley's Theorem says we can embed a group $G$ into $Sym(G)$, the set of bijections $f:G\rightarrow G$. This means we have an isomorphism $G\cong H$ for some $H\leq Sym(G)$. If we're going to generalize this to category theory we need to understand maps that take morphisms to morphisms (those are our group elements, after all). Functors do this, so a generalization of Cayley's Theorem needs to say something about embedding a category $\mathcal{C}$ into a category of functors going out of $\mathcal{C}$. If I want a category of functors, I need to know what maps are between functors. They are natural transformations.

Now, Yoneda's Lemma says we have $\mathrm{Nat}(h^A,F) \cong F(A)$ where $h^A = Hom(A, − )$ and $F$ is any functor from $\mathcal{C}$ to the category of Sets. If we set $F$ to be the functor $h^A$ then Yoneda is telling us $\mathrm{Nat}(h^A,h^A) \cong Hom(A,A)$. But $Hom(A,A)$ is exactly our group (elements are morphisms from $A$ to $A$), so now we see our group as isomorphic to $\mathrm{Nat}(h^A,h^A)$ sitting in a larger functor category. This category which $\mathcal{C}$ is equivalent to is the category of representable functors with maps between functors given by natural transformations. Yoneda's lemma also discusses how it relates to the larger functor category it sits in, because a natural transformation $Φ: h^A \rightarrow F$ is sent to $Φ_A(id_A)$ in $F(A)$.