The concept of coequalizer in a general category is the generalization of the construction where for two functions $f,g$ between sets $X$ and $Y$
one forms the set $Y/_\sim$ of equivalence classes induced by the equivalence relation generated by the relation
for all $x \in X$. This means that the quotient function $p \colon Y \longrightarrow Y/_\sim$ satisfies
(a map $p$ satisfying this equation is said to “co-equalize” $f$ and $g$) and moreover $p$ is universal with this property.
In this form this may be phrased generally in any category.
In some category $\mathcal{C}$, the coequalizer $coeq(f,g)$ of two parallel morphisms $f$ and $g$ between two objects $X$ and $Y$ is (if it exists), the colimit under the diagram formed by these two morphisms
Equivalently:
In a category $\mathcal{C}$ a diagram
is called a coequalizer diagram if
$p \circ f = p \circ g$;
$p$ is universal for this property: i.e. if $q \colon Y \to W$ is a morphism of $\mathcal{C}$ such that $q \circ f = q \circ g$, then there is a unique morphism $q' \colon Z \to W$ such that $q' \circ p = q$
By formal duality, a coequalizer in $\mathcal{C}$ is equivalently an equalizer in the opposite category $\mathcal{C}^{op}$.
Coequalizers are closely related to pushouts:
A diagram
is a coequalizer diagram, def. 2, precisely if
is a pushout diagram.
Conversely:
A diagram
is a pushout square, precisely if
is a coequalizer diagram.
For $\mathcal{C} =$ Set, the coequalizer of two functions $f$, $g$ is the quotient set by the equivalence relation generated by the relation $f(x) \sim g(x)$ for all $x \in X$.
For $\mathcal{C} =$ Top, the coequalizer of two continuous functions $f$, $g$ is the topological space whose underlying set is the quotient set from example 1, and whose topology is the corresponding quotient topology.