(Background: In any category, an epimorphism is a morphism $f:X\to Y$ which is "surjective" in the following sense: for any two morphisms $g,h:Y\to Z$, if $g\circ f=h\circ f$, then $g=h$. Roughly, "any two functions on $Y$ that agree on the image of $X$ must agree." Even in categories where you have underlying sets, epimorphisms are not the same as surjections; for example, in the category of Hausdorff topological spaces, $f$ is an epimorphism if its image is dense.)
What do epimorphisms of (say commutative) rings look like? It's easy to verify that for any ideal $I$ in a ring $A$, the quotient map $A\to A/I$ is an epimorphism. It's also not hard to see that if $S\subset A$ is a multiplicative subset, then the localization $A\to S^{-1}A$ is an epimorphism. Here's a proof to whet your appetite.
If $g,h:S^{-1}A\to B$ are two homomorphisms that agree on $A$, then for any element $s^{-1}a\in S^{-1}A$, we have
$$g(s^{-1}a)=g(s)^{-1}g(a)=h(s)^{-1}h(a)=h(s^{-1}a)$$
Also, if $A\to B_i$ is a finite collection of epimorphisms, where the $B_i$ have disjoint support as $A$-modules, then $A\to\prod B_i$ is an epimorphism.
Is every epimorphism of rings some product of combinations of quotients and localizations? To put it another way, suppose $f: A\to B$ is an epimorphism of rings with no kernel which sends non-units to non-units and such that $B$ has no idempotents. Must $f$ be an isomorphism?

