I'm not sure if this question has asked before, but I've just start to study category theory and I'm still learning what is a functor, so I have some specific questions about that.
Ok, $\text{Grp}$ is a category where the objects are groups and the morphisms is homomorphisms between groups.
For each object $G$ we define $F: \text{Grp} \to \text{Grp}$ such that $F(G) = G'$ and for each morphism $f: G \to H$ we define the morphism $F(f): G' \to H'$.
$F$ is a functor if $F(1_G) = 1_{F(G)}$, and if we have any two morphisms $f: G \to H$ and $g: H \to K$ then $F(g \circ f) = F(g) \circ F(f)$.
Ok, I need to prove these condictions.
But I'm little confused, I imagine that $g \circ f$ is a morphism $g \circ f: G \to K$, then $F(g \circ f)$ is a morphism $F(g \circ f): G' \to K'$.
For otherwise $F(f)$ is a morphism $F(f): G' \to H'$ and $F(g)$ is a morphism $F(g): H' \to K'$, then $G(f) \circ F(f)$ is a morphism $G(f) \circ F(f): G' \to K'$.
Ok, $F(g \circ f)$ and $F(g) \circ F(h)$ are morphisms from $G'$ to $K'$, but what guarantees that they are the same morphism?
If they are the same then $F(1_G) = 1_{F(G)}$ because $1_G$ is the morphism $1_G: G \to G$ such that if we have $f: G \to H$ and $g: K \to G$, then we have $f \circ 1_G = f$ and $1_G \circ g = g$.
Then $F(f) \circ F(1_G) = F(f \circ 1_G) = F(f)$ and $F(1_G) \circ F(g) = F(1_G \circ g) = F(g)$
If by $G'$ you mean the commutator subgroup of a group $G$, just notice that a group homomorphism sends commutators to commutators.
EDIT: you want to define a functor from the category $\operatorname{Grp}$ to itself. One easy way to do that is to associate to each group its derived subgroup, that is the subgroup generated by the set of elements of the form $xyx^{-1}y^{-1}$ and to each group homomorphism $f:G\to H$ the restriction of $f$ to the subgroup of commutators. Call $F$ this correspondence. In order to establish that $F$ is a functor, you have to perform some checks:
That $F(G)$ is a group, for every group $G$, and this is true because $G'$ is a subgroup, hence in particular a group.
That $F(f)$ is a group homomorphism, and this is true, because $f$ is.
That $F(f)$ goes from $G'$ to $H'$, and this holds by definition of $F(f)$ and by the fact that a group homomorphism sends elements of the form $xyx^{-1}y^{-1}$ to elements of the form $f(x)f(y)f(x)^{-1}f(y)^{-1}$
That $F(g\circ f)= F(g)\circ F(f)$, but this is obvious, because $F(f)=f$, $F(g)=g$
That $F(1)=1$, still obvious from definition of $F(f)$ as the restriction of $f$.
Restrincting to a subgroup doesn't affect the composition properties of the group homomorphisms. If $f:G\to H$ and $g:H\to K$, then $g\circ f$ is a group homomorphism from $H$ to $K$, and $F(g\circ f)$ is a group homomorphism from $G'$ to $K'$, and $F(g\circ f)=F(g)\circ F(f)$ because we have defined $F(f)$ to be essentially equal to $f$, for every $f$.