Monomorphisms are embeddings functors (i.e. functors whose both the object-function and the arrow-function are injective).
It easily seen that embeddings are monomorphisms because if $F \colon \mathbf C \to \mathbf D$ is an embedding then for every pair of fucntors $G,H \colon \mathbf X \to \mathbf C$ such that $F \circ G=F \circ H$ then
for every $x \in \mathbf X$ we should have $F \circ G(x)=F \circ H(x)$ and since $F$-object part is injective it would follow that $G(x)=H(x)$;
in exactly the same way for every $f \colon x \to x'$ in $\mathbf X$ we have that $F \circ G(f)=F\circ H(f)$ and for the injectivity of $F$-arrow part we also have that $G(f)=H(f)$;
so $G=H$.
Now let's suppose $F \colon \mathbf C \to \mathbf D$ is monomorphism.
For every object $c \in \mathbf C$ there's a unique functor $\bar x \colon 1 \to \mathbf C$ (where $1$ is the category with one object ($0$) and one arrow) such that $\bar x(0)=x$.
In similar way for every morphism $f \in \mathbf C(c,c')$ there's a unique functor $\bar f \colon 2 \to \mathbf C$ (where $2$ is the category with two objects, $0$ and $1$, and only one non identity morphism $0 \to 1$) such that $\bar f(0)=c$, $\bar f(1)=c'$ and $\bar f(0 \to 1)=f$.
Then it follows that for every pair of objects $c,c' \in \mathbf C$ if we have $F \circ \bar c(0)=F(c)=F(c')=F \circ \bar c'(0)$ then $F \circ c=F \circ c'$ and so by monomorphism property $\bar c=\bar c'$. From this follows that
$$c=\bar c(0)=\bar c'(0)=c'$$
which gives the injectivity of the object part of $F$.
If $f,g \colon c \to c'$ are morphisms of $\mathbf C$ such that $F(f)=F(g)$ it can be proven similarly (using the functor $\bar f$ and $\bar g$) that $f=g$.
From this it follows that also the arrow part of $F$ is injective.
Edit I see that I didn't address the part about epimorphisms in $\mathbf{Cat}$. Let's try to make ammend.
For start it can be shown that every functor that is not sujective on objects cannot be an epimorphism. Indeed if $F \colon \mathbf C \to \mathbf D$ is not surjective we can consider the full subcategory $\mathbf D' \hookrightarrow \mathbf D$ that is spanned by the object in $\text{Im} F$. The consider the pushout of the diagram
where the morphism from $\mathbf D'$ are the embeddings.
Since $F$ factors through $i \colon\mathbf D' \hookrightarrow \mathbf D$ (since it's image is contained in the full subcategory $\mathbf D'$) we have that $G \circ F = H \circ F$.
More in detail there's a functor $\mathcal F \colon \mathbf C \to \mathbf D'$ such that $F=i \circ \mathcal F$ and so
$$G \circ F = G \circ i \circ \mathcal F$$
and
$$H \circ F = H \circ i \circ \mathcal F\, .$$
Since $G \circ i= H \circ i$, because of the pushout property, we have that $G \circ F=H \circ F$, nonetheless $G \ne H$.
This basically prove that epimorphism should at least be sujective on objects.
Clearly this condition is not sufficient, it's easy to find counter examples.
What can be proven is that $F \colon \mathbf C \to \mathbf D$ is sujective on objects and the graph $\text{Im}F$ contains a set of morphism which are generators for the category $\mathbf D$ then this functor is an epimorphism.
By generators for the category $\mathbf D$ I mean a family of morphisms such that every other morphism in $\mathbf D$ is a composite of these morphisms.
The proof of this is no different from the analog proofs for other categories.
Nontheless this is just a sufficient condition as the following example show.
Consider the category $2$ defined as above and $\bar 2$ obtained by $2$ just adding an inverse to the morphism $0 \to 1$.
The embedding $j \colon 2 \to \bar 2$ is an epimorphism since for every $G,H \colon \bar 2 \to X$ such that $G(0\to 1)=G(0 \to 1)$ have to send $1 \to 0$ in *the inverse of $G(0 \to 1)=H(0 \to 1)$.
Of course from this example it becomes clear that one can perfect the previoius said condition by proving that $F \colon \mathbf C \to \mathbf D$ is an epimorphism iff it's surjective on object and every morphism in $\mathbf D$ is a composite of morphism in $\text{Im} F$ and their inverse (if they exist).
Nonetheless I'm not aware if this is a full characterization of epimorphisms in $\mathbf{Cat}$.
Hope this helps.
The other answer deals with monomorphisms, so let's look at epimorphisms. As pointed out in comments, there is a (1970?) preprint of G. Bergman's, Epimorphisms of Lie Algebras, available online, which addresses this question. Further, in the notes at the end of that preprint, we find a reference to Reid, G.A.: Epimorphisms and Surjectivity. Inventiones mathematicae, Volume 9 (1969) pp. 295-307, also available online, which has an overlap with Bergman's preprint.
The highlights relevant to your question about epimorphisms are as follows. Note first of all that w.l.o.g. we can reduce to the question for what subalgebras $\mathfrak h \subseteq \mathfrak g$, the natural inclusion is an epimorphism.
If $K$ is any field, then in the category of all $K$-Lie algebras, necessarily $\mathfrak h =\mathfrak g$, i.e. epimorphisms are surjective (Reid Prop. 4; Bergman Thm 2.1). Either proof goes through the universal enveloping algebra and uses the Poincaré-Birkhoff-Witt theorem; Bergman does it from there with certain beautiful ring-theoretic characterisations of epimorphisms (for which cf. answers to MO/120918), whereas Reid uses the beautiful criterion that the inclusion $\mathfrak h \subset \mathfrak g$ is an epimorphism if and only if for every $\mathfrak g$-module $V$, every element $v \in V$ that is annihilated by $\mathfrak h$ is annihilated by all of $\mathfrak g$. And for $\mathfrak h \subsetneq \mathfrak g$, he constructs (via the universal enveloping algebra and PBW) a module $V$ where that is not the case.
If $char(K)=0$, then in the category of finite dimensional $K$-Lie algebras, there are epimorphisms which are not surjective. (Bergman Example 4.1, Reid Prop. 7). Indeed in analogy to the criterion above, Bergman shows (Corollary 3.2) that the inclusion $\mathfrak h \subseteq \mathfrak g$ is an epimorphism in this category if and only if for every finite dimensional $\mathfrak g$-module $V$, every element $v \in V$ that is annihilated by $\mathfrak h$ is annihilated by all of $\mathfrak g$; and then there are obvious examples of proper inclusions like this. Namely, as both sources note, if $\mathfrak g$ is split semisimple (like $\mathfrak{sl}_n(K)$, or every semisimple Lie algebra if $K=\mathbb C$), then the inclusion of any Borel subalgebra (and hence, of any parabolic subalgebra) $\mathfrak h \subset \mathfrak g$ is an epimorphism. Indeed, that Bergman's example, the inclusion of the standard Borel $$\{\pmatrix{\alpha & \beta \\0&-\alpha}:\alpha, \beta \in K\} \hookrightarrow \mathfrak{sl}_2(K) $$ satisfies the mentioned criterion for finite-dimensional $\mathfrak{sl}_2(K)$-representations, follows immediately from the basics of the representation theory of $\mathfrak{sl}_2$ covered in any worthwhile resource on Lie algebra representations.
Bergman points out various examples of non-surjective epimorphisms in the category of finite-dimensional Lie algebras over a characteristic $0$ field which are not immediately given by parabolic subalgebras as above, but notes that there still might be a chance to classify them, with the parabolic ones as a cornerstone (see p. 13/14 and "Addenda" at the end of Bergman's preprint). Correspondingly, Reid proves (Prop. 10) that in the category of real compact (fin.-dim.) Lie algebras, epimorphisms are surjective. (Note that real compact Lie algebras basically have no proper parabolic subalgebras.)
Bergman has further interesting results in positive characteristic, which for once seems to be better behaved than characteristic $0$. -- Reid, on the other hand, has the characteristic-free result (Prop. 5/6) that in the category of finite-dimensional nilpotent Lie algebras over $K$ as well as in the category of finite-dimensional solvable Lie algebras over $K$, epimorphisms are surjective.
So this was the state of the art 50 years ago. I would not be surprised, but delighted, to hear of more recent results especially regarding no. 3.
Best Answer
It is obvious that injective (respectively, surjective) group homomorphisms are monomorphisms (respectively, epimorphisms).
Monomorphisms in the category of groups are injective maps. Indeed, suppose $\phi\colon G\to H$ is a monomorphism; consider $\alpha\colon\ker\phi\to G$, the canonical injection, and $\beta\colon\ker\phi\to G$, $\beta(x)=1$. Then $\phi\circ\alpha=\phi\circ\beta$: what does $\alpha=\beta$ entail?
Epimorphisms in the category of groups are surjective, but this is a bit more difficult to show (one needs to define an action on the set of cosets of $H$ by the image of $\phi$).
The standard example of a nonsurjective epimorphism in a category is the embedding $\mathbb{Z}\to\mathbb{Q}$ in the category of rings, which is both a monomorphism (obvious) and an epimorphism (try it).