Given a total function $f \colon A \to B$, by grouping the "points" on $A$ which have the same image on $B$, namely $a,b \in A$ located in the same equivalence class $G_{i}$ iff $f(a) = f(b)$.
By that way, I get a partition $G = \{ G_{1},G_{2},\dotsc \}$ on $A$ derived from $f$, and concurrently I can represent $f = g \circ h$ where $h \colon A \to G$ and $g \colon G \to B$. This representation is unique if $h$ is monic, namely if $f = g' \circ h'$ where $g' \colon A \to G$ and monic $h' \colon G \to B$, then $g' = g$ and $h' = h$.
I doubt that this simple situation has a more general interpretation in the category theory but I don't know what it is. Can anyone please give me some suggestion ?