What are the epimorphisms and monomorphisms in the category of affine varieties?

I am posting my comment as an answer as requested, with some more concrete references.

We start with monomorphisms:

Proposition [Borceux, Ex. 1.7.7.d]. A homomorphism of unital commutative rings is a monomorphism if and only if it is injective.

Epimorphisms are harder to describe; see this MathOverflow question, and especially David Rydh's answer, which states a characterization of monomorphisms among morphisms of schemes which are locally of finite type.

We state a general characterization of epimorphisms of rings:

Theorem [Roby, Thm. 1]. Let $f \colon R \to S$ be a homomorphism of unital commutative rings. The following are equivalent:

  1. $f$ is an epimorphism;
  2. For every $R$-algebra $T$, there exists at most one $R$-algebra homomorphism $S \to T$;
  3. For all $s \in S$, the relation $1 \otimes s = s \otimes 1$ holds in $S \otimes_R S$;
  4. The multiplication map $\mu \colon S \otimes_R S \to S$ is injective (in which case it is an isomorphism of $R$-algebras);
  5. The canonical injection $i_1 \colon S \to S \otimes_R S$ (resp. $i_2 \colon S \to S \otimes_R S$) defined by $s \mapsto s \otimes 1$ (resp. $s \mapsto 1 \otimes s$) is surjective (in which case it is an isomorphism of $R$-algebras);
  6. The tensor algebra $T_R(S)$ is commutative;
  7. $S \otimes_R S/R = 0$.

I've skipped some of the conditions; see [Roby] for more. Roby's article is from a seminar directed by Samuel, which is probably the most thorough source on epimorphisms of rings. Finally, see [Lazard] for results on flat epimorphisms, and [Stacks, Tag 04VM] for a modern reference.