For any morphism $f : A \to B$ in any category $\mathcal{C}$, there is a functor $\Sigma_f : \mathcal{C}/A \to \mathcal{C}/B$ given by composing objects with $f$.
If the pullback functor $f^* : \mathcal{C}/B \to \mathcal{C}/A$ exists, then $\Sigma_f \dashv f^*$.
(I'm not sure if we still use the name $\Sigma_f$ should $f^*$ not exist)
The general case reduces to the case of $B$ is a terminal object and we substitute $\mathcal{C}/1 \equiv \mathcal{C}$. In this case it's easy to see the adjunction: given an object $X \to A$ of $\mathcal{C}/A$ and $Y$ of $\mathcal{C}$, we need to prove the natural isomorphism
$$ \hom_\mathcal{C}(X, Y) \cong \hom_{\mathcal{C}/A}(X \to A, Y \times A \to A)$$