$\def\D{\mathcal{D}}\def\C{\mathcal{C}}$ Let $G: \C \rightarrow \D$ be a functor. For each $D \in \D$ define the category $(D \downarrow G)$ which has as objects pairs $(C,g)$ with $C \in \C$ and $g: D \rightarrow G(C)$. An arrow $(C,g) \rightarrow (C,g')$ is an arrow $f: C \rightarrow C'$ such that $G(f)\circ g = g'$ (with obvious composition).
An exercise says that the functor $G$ has a left adjoint iff for each $D \in \D$ the category $(D \downarrow G)$ has an initial object. I have shown $\Leftarrow$, which was just constructing the functor $F$ and verifying that $F \dashv G$ holds. However, for $\Rightarrow$ I have no clue. Any tips for which element could be the initial element?
Start with a $D \in \mathcal{D}$. You want an initial object in $(D \downarrow G)$, so you want an object $C \in \mathcal{C}$ and a map $g : D \to G(C)$. It is pretty natural to take $C = F(D)$ (actually this is the only natural object you can build with $D$ here.) So now you're looking for a map $g : D \to G(F(D)).$ But by adjunction it is equivalent to look for a map $f : F(D) \to F(D)$. Here it is natural to take $f = id_{F(D)}.$ Now it let you prove that this is the initial object.