$\phi$ is a monomorphism in the category of presheaves of sets iff it is injective as a morphism of presheaves In class, we defined a morphism $\phi: \mathcal{F} \rightarrow \mathcal{G}$ of presheaves to be injective if the map $\phi(U): \mathcal{F}(U) \rightarrow \mathcal{G}(U)$ is injective for every open $U $ in the topological space $X$. 
Now there is an exercise, which goes as:
Problem: Let $\phi: \mathcal{F} \rightarrow \mathcal{G}$ be a morphism of presheaves of sets on the topological space $X$. Show that $\phi$ is a monomorphism in the category of presheaves of sets on $X$ iff $\phi$ is injective as a morphism of presheaves.
I am a little bit confused of what this means. I know what a monomorphism means in a category $\mathcal{C}$. We call an arrow $f: A \rightarrow B$ between objects in the category $\mathcal{C}$ a monomorphism, if for any two arrows $g_1, g_2: C \rightarrow A$ with $f \circ g_1 = f \circ g_2$ it follows that $g_1 = g_2$. 
My confusion is: what does the statement "$\phi$ is a monomorphism in the category of presheaves of sets on $X$" mean? Are the presheaves $\mathcal{F}$ and $\mathcal{G}$ considered as the objects here? So does $\phi$ play the role of $f$ in the definition of monomorphism given earlier? 
If that is the case, I have no idea how to prove this. I assume we have a monomorphism. Let $U \subset X$ be open. I wish to show that $\phi(U) : \mathcal{F}(U) \rightarrow \mathcal{G} (U)$ is injective. So given sections $s_1, s_2 \in \mathcal{F}(U)$ with $\phi(U)(s_1) = \phi(U)(s_2)$, I wish to prove that $s_1 = s_2$. How can this be done? 
 A: Fix some (small) category $\mathcal{C}$, then the category of presheaves on $\mathcal{C}$ is defined as follows:

*

*Objects. Functors $\mathcal{C}^\text{op} \to \mathbf{Set}$.

*Arrows. Natural transformations, so given presheaves $F, G: \mathcal{C}^\text{op} \to \mathbf{Set}$ an arrow $\alpha: F \to G$ is a natural transformation $\alpha$.

Common notations for the category of presheaves are $\hat{\mathcal{C}}$, $\mathbf{Set}^{\mathcal{C}^\text{op}}$ and $[\mathcal{C}^\text{op}, \mathbf{Set}]$.
So yes, $\phi$ plays the role of $f$ in the definition you talk about.

Let's now have a look how to prove the actual question. Throughout we let $\phi: F \to G$ be a morphism of presheaves (i.e. a natural transformation). I will put part of the answers in spoilers (hover your mouse to see them), so that you can try to finish them yourself. Also, after you have understood the first direction, try the converse yourself first.
$\phi$ injective $\implies$ $\phi$ mono. Let $\alpha, \beta: H \to F$ be morphisms of presheaves, such that $\phi \alpha = \phi \beta$. We have to prove $\alpha = \beta$. Let $U$ be any object in $\mathcal{C}$, and let $x \in H(U)$, we have to prove $\alpha(U)(x) = \beta(U)(x)$ (why is this enough?).

 We have $(\phi \alpha)(U)(x) = (\phi \beta)(U)(x)$, so writing that out we get $\phi(U)(\alpha(U)(x)) = \phi(U)(\beta(U)(x))$ and then injectivity of $\phi(U)$ implies that $\alpha(U)(x) = \beta(U)(x)$, as required.

$\phi$ mono $\implies$ $\phi$ injective. Let $\phi: F \to G$ be a monomorphism in the category of presheaves. Let $U$ be in $\mathcal{C}$, we have to prove that $\phi(U): F(U) \to G(U)$ is injective. So let $x, y \in F(U)$ such that $\phi(U)(x) = \phi(U)(y)$, we need to prove $x = y$. We define a presheaf $H$ as follows, for $V$ in $\mathcal{C}$:
$$
H(V) = \operatorname{Hom}_{\mathcal{C}}(V, U)
$$
where for $f: V \to V'$ the map $H(g)$ takes $g: V' \to U$ to $fg: V \to U$. Check that this indeed defines a presheaf. Now let $\alpha: H \to F$ be defined by $\alpha(V)(f) = F(f)(x)$, and check that this indeed defines a natural transformation of presheaves. Similarly, let $\beta: H \to F$ be defined by $\beta(V)(f) = F(f)(y)$.

 We claim that $\phi \alpha = \phi \beta$. Indeed, by naturality:
 $$\phi \alpha(V)(f) = \phi(V) (F(f)(x)) = G(f)(\phi(U)(x)) = G(f)(\phi(U)(y)) = \phi(V) (F(f)(y)) = \phi \beta(V)(f).$$
 Since $\phi$ is mono, we thus must have $\alpha = \beta$ and so $x = F(Id_U)(x) = \alpha(U)(Id_U) = \beta(U)(Id_U) = F(Id_U)(y) = y$, as required.

This argument is essentially writing out a use of Yoneda's lemma, as Yining Chen wrote in their answer, where they also pointed out that a previous version of this answer contained a mistake.
A: I don't think the answer of Mark Kamsma is correct since there may be more than one arrow $V\rightarrow U$ and we will not have a well defined natural transformation $H\rightarrow F$.
To prove a monomorphism is an injection we need the Yoneda's lemma. For $f:F\rightarrow G$, if $f(U)(x)=f(U)(y)$, then viewing $x,y$ as natural transformations $h_U\rightarrow F$ then $f\circ x=f\circ y$. Since $f$ is monic, $x=y$.
To prove an epimorphism is a surjection is more subtle. Suppose $f:F\rightarrow G$ is an epimorphism and we need to show $\mathrm{im}f=G$. If this is not true then for sub-presheaves $\mathrm{im}f$ and $G$, there will have two different natural transformations $G\rightarrow \Omega$ where $\Omega$ is the subobject classifier in $Pre(\mathcal{C})$. But the composition $$F\xrightarrow{f}G\rightarrow \Omega$$ will coincide. It's actually
$$F\xrightarrow{f}\mathrm{im}f\subseteq G\rightarrow 1\rightarrow \Omega$$ Since $f$ is epic, this is a contradiction.
