The idea is the following. If $f: X \to Y$ and $g : X \to Y$ are two (continuous) maps, they are homotopic if there is a family $f_t : X \to Y$ of maps interpolating them, i.e., $f_0 = f$ and $f_1 = g$.
And this "family" has to be continuous in parameter $t$, whatever that means.
Is this on the surface clear? Don't bother about the formalism very much, think of it as interpolation between maps
Nothing much! $f$ and $g$ being homotopic merely means there exists some interpolating family $\{f_t\}_{t \in [0, 1]}$ going between them. There can be a lot of such families, and $f_{t = 1/2}$ would depend very much on what family you choose.
Let's finish with the formalism since we are here so far. If $X$ and $Y$ are two (topological) spaces, we say they are "homotopy equivalent" if there is a map $f : X \to Y$ such that there is a "homotopy inverse" $g : Y \to X$. Namely, $fg : Y \to Y$ is homotopic to the identity map $\text{id} : Y \to Y$ and $gf : X \to X$ is homotopic to the identity map $\text{id} : X \to X$.
This brings us to the notion of homeomorphism, actually.
If $X$ and $Y$ are homeomorphic, what that means is there is a map $f : X \to Y$ such that there is an actual fucking inverse $g : Y \to X$. Aka, $fg = \text{id}_Y$ is the identity map $Y \to Y$, and $gf = \text{id}_X$ is the identity map $X \to X$.
Yeah, it's much stronger than homotopy equivalence.
Basically, if you have two geometric objects which you can deform from one to another without cutting or gluing, just bending, stretching, doing things to it, then they are homeomorphic.
It's really the right notion of "equivalence" of spaces.
@Bernardo Well, genus is something that makes sense for only a small class of 2-dimensional spaces. Surfaces, in particular. But yes, two surfaces of different genus are NOT homotopy equivalent.
The torus and the sphere are not homotopy equivalent for example.
Technically speaking IFT doesn't actually give you an inverse, it just gives you a local inverse, for infinitely differentiable maps, and for a restricted class of spaces only (manifolds).
But yeah there's no general algorithm for finding homotopy inverse.
It tells if you check that a certain map $f : X \to Y$ between reasonably nice spaces satisfies a series of algebraic conditions, then $f$ is a homotopy equivalence.
@BernardoMeurer Sometimes, yup. Because the algebraic conditions are not super easy to check.