Let $\textbf{C}/C$ be a slice category with base object $C$.
The functor that comes to mind is the one such that objects $f:X \to C$ are mapped to $X$, and arrows $a: X \to X'$ are mapped to themselves.
Let $F$ be this mapping. Then since, the identiy on the object $f: X\to C$, is $1_X$, we have that $F(1_f) = F(1_X) = 1_{F(X)}$. Further, if $a: f \to g$, then define $F(a) = a$, for which we have $F(a): F(f) \to F(g)$, and finally $F(i \circ j) = i \circ j$.
First of all how can I make it explicit that $a : f \to g$ in $\textbf{C}/C$, but in $\textbf{C}$, $a: \text{dom}(f) \to \text{dom}(g)$?
And then how is $C$ "forgotten"?
$a : f \to g$ is already an explicit way to say $a : f \to g$. If you want to put the category in the notation, a simple way is to use a homset; two notations for such are
$$ a \in \hom_{\mathcal{C}/C}(f, g) \qquad \qquad \text{or} \qquad \qquad a \in (\mathcal{C}/C)(f, g) $$
Alternatively, rather than writing $f$ for an object of $\mathcal{C}/C$, you may instead write $(X,f)$ for the object. Or even the whole diagram $X \xrightarrow{f} C$. Then maybe having both $a : (X,f) \to (Y,g)$ and $a : X \to Y$ is already sufficient for your tastes.
As for forgetting $C$, it's just what it sounds like; applying $F$ just discards everything related to $C$. For example, on the left is a depiction of a commutative triangle in $\mathcal{C} / C$. Applying $F$ just lops off everything crossing the dotted line, to give the triangle on the right.