The above is an intuitive explanation, and is not at all rigorous. It may even be a little misleading, since the "blobs" in a true homotopy are not arbitrary sets; they are the continuous images of some other space R. In other words, a common space R must be capable of creating both blobs in S. It is the functions, not the blobs, that are homotopic.
Let R and S be topological spaces, and let f0 and f1 be continuous functions from R into S. Let I be the unit interval [0,1]. Let P be the product space R cross I, also written R:I, with the product topology. If f is a continuous function from P into S, where f restricted to 0 = f0, and f restricted to 1 = f1, then f is a homotopy, and f0 and f1 are homotopic.
Let the variable t represent time. As time advances from 0 to 1, ft moves from f0 to f1. This is the first blob moving onto the second. And for any time t, ft, the restriction of f to t, is continuous. We always maintain a continuous image.
Let's look at it another way. Fix a point x in R. This defines a subspace of P, namely x cross I, that is homeomorphic to the unit interval. Restrict f to this subspace and find a continuous map. The image of x traces out a path from f0(x) to f1(x), i.e. the continuous image of the unit interval. All the points in the first blob trace out paths as they move in concert to their destinations in the second blob.
If f0 and f1 are homotopic, compose t with 1-t to find a new continuous map that carries f1 back to f0. In other words, the homotopic relation is symmetric.
Finally assume f0 is homotopic to f1, is homotopic to f2. When t ranges from 0 to 1 f implements the first homotopy, and when t ranges from 1 to 2 f implements the second. Since both definitions agree on t = 1, f is well defined. If you want to be rigorous, you need to prove that an open set in the subspace t ≥ 1, union an open set in the subspace t ≤ 1, produces an open set in P. Choose an open set in S, and let x ∈ R be in the preimage of this open set under f1. Thus x:1 ∈ P is in the preimage under f. Let B1 be a base open set in the lower half of P, containing x:1. In other words, B1 is the cross product of a base open set in R and an open interval (1-ε,1]. Similarly, let B2 be a base open set in the upper half of P, containing x:1. Restrict B1 and B2 to an open set W in R that lies in their intersection. Now B1 is W:(1-ε,1], and B2 is W:[1,1+γ). Put this together and x:1 is contained in an open set in P. The preimage of our open set is open in P, across t = 1, and the entire function is a homotopy, making f0 and f2 homotopic. (If you want to be technical, divide t by 2, so that time once again runs from 0 to 1.)
Homotopic is reflexive, symmetric, and transitive, and forms an equivalence relation. Thus the homotopic functions from R into S form equivalence classes, and these are called homotopy classes.
And the process can be reversed. If f:g is continuous into S then f is continuous into C1 and g is continuous into C2, and f0 and f1 are homotopic, as are g0 and g1.
Let f(x,t) = f0(x)+t×(f1(x)-f0(x)). This is obviously continuous, but let's spend a couple minutes proving it. (In subsequent sections I'll probably skate quickly across these continuity details.)
Let x:t be in the preimage of an open ball in Rn. Find an open set δ so that f0(x) doesn't stray by more than ε when x is restricted to δ. Find a similar δ for f1 and intersect the two neighborhoods to make an even smaller δ.
Let y be in the δ neighborhood of x, and let u and v be the images of x and y under f0. As time advances, u and v move linearly to their new locations f1(x) and f1(y). At the start and end they are within ε of each other, and since they move linearly, they are always within ε of each other.
Now find γ so that γ×(f1(x)-f0(x)) is less than ε. When time is restricted to t±γ, the image of x does not stray by more than ε. And the image of y stays within ε of the image of x. When time and space are restricted by γ and δ respectively, this base open set is mapped into a ball of radius 2ε. The preimage of an open set in Rn can be covered in base open sets, and f is continuous.
In summary, any two functions into Rn are homotopic. There is only one homotopy class, and it can be represented by the function that maps the entire domain to 0.
Next, let the domain be Rn, and let S be any path connected space. Let f0 and f1 be any two continuous functions from Rn into S. Let x be any point in Rn. As t moves from 0 to 1, the image of x is f0((1-t)x). The homotopy slides everything towards f0(0). As t runs from 1 to 2, f runs a path from f0(0) to f1(0), which we can do, since S is path connected. Then, as t runs from 2 to 3, the image of x is f1((t-2)x). Do this for all x in Rn. Take a moment to prove this 3-part map is a homotopy. The first and third pieces represent reparameterizations of the domain, as described above. The middle piece is a path, which is a homotopy on a point. Therefore any two functions from Rn into a path connected space are homotopic.
Let v(D) represent a homotopy class of D into S. Apply f to find the corresponding homotopy class in T. Then apply g to find a homotopy class in S. The composition of these two maps carries v into something that is homotopic to v, just as it carries S into something homotopic to S. Restrict S cross I to v(D) cross I to demonstrate the homotopy on v(D). This pulls back to a homotopy on D. The result is the same homotopy class. Therefore the composition induces the identity map on homotopy classes. The same holds in reverse, hence f and g create a bijection between homotopy classes, and the spaces are homotopically equivalent.
Take a moment to prove "homotopically equivalent" is an equivalence relation. The only tricky part is transitivity. Compose functions to map homotopy classes from S to T to U, and back to T, and back to S. This composes two bijections, giving another bijection.
to illustrate, let S be a single point and let T be a closed ball in a metric space. Let f map S to the center of T and let g map T onto S. The composition in one direction gives the identity map on S. The reverse composition maps T to its center. A homotopy contracts T linearly onto its center, hence the point and the ball are homotopically equivalent. The same proof works for any set T that is star convex in a topological vector space. Its one and only homotopy class is represented by the trivial function from D onto the center of the star.
An example is the plain without the origin and the unit circle. The function g preserves the angle θ, and sets the radius to 1. The homotopy pulls the plane onto the circle. Defining the homotopy, and proving it is continuous is a bit technical; I'll leave the details to you. In any case, the homotopy classes of the circle are the homotopy classes of the punctured plane.