It is essential to be careful about base points here. Given a continuous map $f : X \to Y$, and a base point $x_0 \in X$, then $f$ induces a homomorphism $f_* : \pi_1(X,x_0) \to \pi_1(Y, f(x_0))$. This is proved in any algebraic topology textbook and the other answer.
But there is something crucial here: $f_*$ depends on the base point. Here are two things to convince you of that.
First, you didn't mention that the spaces you consider are path-connected. If they are not, then the notion of "the fundamental group" of $X$ (or $Y$) does not even make sense. For every base point of $X$ (or $Y$), you can have a different fundamental group. If the spaces are path-connected, then they are all isomorphic and we can speak about "the fundamental group". But in general that is not the case.
For a silly example, consider $X = \mathbb{RP}^2$ and $Y = \mathbb{RP}^2 \sqcup S^1$, the disjoint union of a real projective plane and a circle. Consider $f : X \to Y$ to be simply the inclusion of one summand of the direct product.
The space $X$ is path-connected, so we can speak of "the fundamental group" of $X$, which is $\mathbb{Z}/2\mathbb{Z}$. However $Y$ is not path-connected, and depend on where you choose the base point you either get $\mathbb{Z}/2\mathbb{Z} = \pi_1(\mathbb{RP}^2)$ or $\mathbb{Z} = \pi_1(S^1)$.
Now if you choose any base point $x_0 \in X$, then you will always have $f(x_0) \in \mathbb{RP}^2$, and so $f$ will never induce a homomorphism from $\pi_1(\mathbb{RP}^2,x_0)$ to the fundamental group of $Y$ based at a point that is in $S^1$, i.e. $\mathbb{Z}$.
Second, even if your spaces are path-connected, then you need to specify which base point you choose to get a well-defined homomorphism. Indeed, I said earlier that for path connected spaces, fundamental groups with any base point will be isomorphic.
But this isomorphism depends on the choice of a path. Given $x_0, x_1 \in X$, any path $\gamma$ from $x_0$ to $x_1$ induces an isomorphism $\gamma_* : \pi_1(X,x_0) \to \pi_1(X,x_1)$. But if you change the path $\gamma$, you change the isomorphism! If you have another path $\gamma'$, then $\tau = \gamma' \circ \gamma^{-1}$ is a loop at $x_1$, i.e. an element of $\pi_1(X,x_1)$. The induced isomorphism $\gamma'_* : \pi_1(X,x_0) \to \pi_1(X,x_1)$ is nothing but $\gamma_*$ composed with conjugation by $\tau$, i.e. $\tau \circ (-) \circ \tau^{-1}$.
So even if your spaces are path connected, then a continuous map only induces a conjugation class of homomorphisms between fundamental groups, if you don't choose base points. If the fundamental groups are abelian then it does not matter (because conjugation is always trivial in an abelian group), but in general this matters.
If I may cite Grothendieck from Ronald Brown's webpage (the emphasis is mine):
What you write about Loday's n-Cat-groups makes sense for me and is quite interesting indeed. When you say they capture truncated homotopy types, I guess you mean "pointed 0-connected (truncated) homotopy types". This qualification seems to me an important one - while they are presumably quite adequate for dealing with a number of situations, it is kind of clear to me they are not for a "passe partout" description of homotopy types - both the choice of a base point, and the 0-connectedness assumption, however innocuous they may seem at first sight, seem to me of a very essential nature. To make an analogy, it would be just impossible to work at ease with algebraic varieties, say, if sticking from the outset (as had been customary for a long time) to varieties which are supposed to be connected. Fixing one point, in this respect (which wouldn't have occurred in the context of algebraic geometry) looks still worse, as far as limiting elbow-freedom goes! [...]
If you want to reread this answer with high-level language, then I'm saying "the fundamental group" is only a functor on based topological spaces, not general topological spaces. If you want a functor on all topological spaces, then you need to consider the fundamental groupoid (see also this MO post).