A typical example arising in algebraic geometry is the following.

Take a scheme $X$ of finite type over $\mathbb{C}$. Then there are (at least) two concepts of fundamental group for $X$: the *topological fundamental group* $\pi_1^{top}(X)$, i.e. the fundamental group of the underlying topological space $X(\mathbb{C})$ with the analytic topology, and the *étale fundamental group* $\pi^{et}(X)$, which is a purely algebraic object (it is an inverse limit of finite automorphism groups). 

By the so-called Riemann Existence Theorem, the finite covering of $X(\mathbb{C})$, that a priori are only analytic spaces, have actually a scheme structure. This implies that $\pi_1^{et}(X)$ is precisely the profinite completion of $\pi_1^{top}(X)$. 

Therefore there is a group homomorphism $$\eta \colon \pi_1^{top}(X) \longrightarrow \pi_1^{et}(X),$$
which is injective precisely when $X$ is residually finite.

For instance, if for some reason we know that $\pi_1^{top}(X)$ is residually finite and we are able to show that $\pi_1^{et}(X)=0,$ then we can conclude that $\pi_1^{top}(X)=0,$ too.

J. P. Serre asked if there exist smooth, complex varieties such that $\pi_1^{top}(X)$ is *not* residually finite (and hence $\eta$ is not injective). 
A consequence of a theorem of Malcev is that if $\pi_1^{top}(X)$ has a faithful linear representation, then it is residually finite. Hence if $X$ is a variety answering affirmatively Serre's question, its topological fundamental group must have no faithful linear representation. Such varieties actually exist, and the first examples were constructed by D. Toledo, see

*[Projective varieties with non-residually finite fundamental group][1]*, Publications Mathématiques de l'Institut des Hautes Études Scientifiques
Volume **77**, Issue 1 (1993), 103-119. 


  [1]: http://link.springer.com/article/10.1007/BF02699189#page-1