I will straight off assume that continuity is something everyone's
comfortable with, and build on top of that.
Homotopies and homotopy equivalences
We say that two continuous maps, f,g:X→Y between topological spaces are
homotopical, and write [tex]f\simeq g[/tex], if there is a continuous
map [tex]H\colon X\times[0,1]\to Y[/tex] such that H(x,0)=f(x) and
H(x,1)=g(x). This captures the intuitive idea of step by step nudging
one map into the other in formal terms.
Two spaces X,Y are homeomorphic if there are maps [tex]f\colon X\to
Y[/tex],[tex]f^{-1}\colon Y\to X[/tex] such that
[tex]ff^{-1}=\operator{Id}_Y[/tex] and
[tex]f^{-1}f=\operator{Id}_X[/tex].
Two spaces X,Y are homotopy equivalent if there are maps [tex]f\colon
X\to Y[/tex],[tex]f^{-1}\colon Y\to X[/tex] such that
[tex]ff^{-1}\simeq\operator{Id}_Y[/tex] and
[tex]f^{-1}f\simeq\operator{Id}_X[/tex].
Now, if f,g are maps X→Y and f=g, then [tex]f\simeq g[/tex], since we
can just set H(x,t)=f(x)=g(x) for all t, and get a continuous map out of
it. Thus homeomorphic spaces are homotopy equivalent, since the relevant
maps are equal, and thus homotopic.
There are a couple of more properties for homotopic maps we'll want. It
respects composition - so if [tex]f\simeq g\colon X\to Y[/tex] and
h:Y→Z and e:W→X then [tex]hf\simeq hg[/tex] and [tex]fe\simeq
ge[/tex]. This can be seen by considering h(H(x,t)) and H(e(x),t)
respectively.
Denote by D2 the unit disc in [tex]\mathbb R^2[/tex], and by
{*} the subset {(0,0)} in [tex]\mathbb R^2[/tex]. Then
[tex]D^2\simeq\{*\}[/tex]. In one direction, the relevant map is
just the embedding, and in the other direction, it collapses all of
D2 onto {*}. One of the two relevant compositions is trivially
equal the identity map, and in the other direction, the linear homotopy
H(x,t)=tx will do well. Thus the disc and the one point space are
homotopy equivalent.
The fundamental groupoid
Let X be a topological space (most probably with a number of neat
properties - I will not list just what properties are needed though),
and consider for each pair x,y of points in X, the set [x,y] of
homotopy classes of paths from the point x to the point y. A path,
here, is a continuous map [0,1]→X. We can compose classes - if
[tex]\gamma\in[x,y][/tex] and [tex]\gamma'\in[y,z][/tex], then we
can consider the map
[tex]\gamma\gamma'(t)=\begin{cases}\gamma(2t)&0\leq
t<1/2\\\gamma'(2t-1)&1/2\leq t\leq1\end{cases}[/tex]. This is a
path from x to z, and so belongs to a class in [x,z]. This class is
well defined from the choices of γ, γ' since homotopies and
composition of maps work well together.
This gives us a composition. It is associative - on homotopy classes.
What happens if we look at maps instead of homotopy classes is part of
the subject of my own research. It has an identity at each point x - the
constant path γ(t)=x, and for each class in [x,y] there is a class in
[y,x] such that their composition is homotopic to the constant path in
[x,x].
Thus, we get a groupoid. This is called the fundamental groupoid, and
denoted by [tex]\pi_1(X)[/tex]. If we fix a point, and consider [x,x],
then this is a group, called the fundamental group with basepoint x,
and denoted by [tex]\pi_1(X,x)[/tex].
For [tex]\mathbb R^n[/tex], a linear homotopy will make any two paths
in [x,y] homotopic - and so |[x,y]|=1 in [tex]\pi_1(\mathbb
R^n)[/tex] for any x,y.
For S1 - the circle - we can choose to view it as [0,1]/(0=1).
Then we can consider the paths fm(t)=a(1-t)+bt+nt. This is a
path from a to b, and it winds n times around the circle. Each path in
[a,b] is homotopic to a fm, by a linear homotopy, which just
rescales the speeds through various bits and pieces, and possibly
straightens out when you double back. Thus, [tex][a,b]=\mathbb Z[/tex].
Furthermore, if you compose fmfn, you'll get
fn+m.
If we pick out the fundamental group out of this groupoid, we'll get the
well known fundamental group [tex]\pi_1(S^1,p)=\mathbb Z[/tex].
Now, suppose we have two homotopy equivalent spaces X and Y, with the
homotopy equivalence given by f:X→Y and g:Y→X. Then consider the map
f*:[x,y]:sub:X→[f(x),f(y)]Y given by
f*γ(t)=f(γ(t)). I claim
1) f* is bijective.
2) f* works well with composition of classes.
For bijectivity we start with injectivity in one direction. Consider
two paths [tex]\gamma\not\simeq\gamma'[/tex] in [x,y]. We need to
show [tex]f_*\gamma\not\simeq f_*\gamma'[/tex]. If
[tex]f_*\gamma\simeq f_*\gamma'[/tex], then
[tex]g_*f_*\gamma\simeq g_*f_*\gamma'[/tex]. However, then
[tex]\gamma\simeq g_*f_*\gamma\simeq
g_*f_*\gamma'\simeq\gamma'[/tex]
which contradicts [tex]\gamma\not\simeq\gamma'[/tex]. Thus
[tex]g_*f_*\gamma\not\simeq g_*f_*\gamma'[/tex], and so
also [tex]f_*\gamma\not\simeq f_*\gamma'[/tex].
The proof is symmetric in the choice of direction, and so we can just
repeat the same argument to get that g* is also an injection.
Thus we can conclude that f* is in fact a bijection.
Now, for the second part, we consider [tex]\gamma\in[x,y][/tex] and
[tex]\delta\in[y,z][/tex]. We need to show that
[tex]f_*(\gamma\delta)=f_*\gamma f_*\delta[/tex]. But
[tex]\gamma\delta[/tex] is the path that first runs through
[tex]\gamma[/tex] in half the time, then runs through
[tex]\delta[/tex] in the rest of the time, and
[tex]f_*(\gamma\delta)[/tex] just transports this path point by
point to Y. And [tex]f_*\gamma[/tex] transports [tex]\gamma[/tex]
point by point to Y and [tex]f_*\delta[/tex] transports
[tex]\delta[/tex] point by point to Y, and [tex]f_*\gamma
f_*\delta[/tex] just runs through the first of these in half the
time, then the rest in the rest of the time.
Thus, homotopy equivalent spaces have the same fundamental groupoid.