For example, in the category of sets a morphism is an epimorphism iff it is surjective. This is true in the category of groups with homomorphisms, the category of topological spaces with continuous functions. However this is not true in the category of monoids, rings, etc. (For more examples see https://en.wikipedia.org/wiki/Epimorphism#Examples)
Is there a classification of categories where the two are equivalent? Or are there some properties of categories where they're equivalent? Obviously we must be working in a concrete category to talk about "surjective". But is there anything else we can say about the category?