Meaning of "holes" counted by homology groups In a lot of more or less informal introductions to simplicial homology
often the groups $H_k(X)$ of a topological space or CW space
are introduced as groups which "counting $k$-dimensional holes". I know that
is of course motivated by rather elementary examples but nevertheless
even if we discuss simple examples like sphere or torus it is
not clear to me what is preciesely meant by a "$k$-dimensional hole".
Can it be clarified? Note, that it's only about intuition, I know that all this 'hole counting approach' of homology groups cannot be formally approached, but even from 'informal' point of view I see several problems which I would like to clarify.
The two most common examples, the $2$-sphere $S^2$ and
the torus $T= S^1 \times S^1$ are discussed here in Wikipedia:  these two examples carry exactly the two properties of this 'hole terminology' which I find rather misleading or maybe just misunderstand.
The terminology of "holes" in case of $S^2$ looks to me intuitively rather acceptable up to the dimension choice, see further.
We call the $0$-holes the connected components. Since the sphere
is hollow, it is reasonable to say that is has a "hole".
But why this "hole" of $S^2$ is called $2$-dimensional hole?
Intuitively the hollow space inside of $S^2$ is $3$-dimensional,
therefore I not understand what is the logic behind the name
"$2$-hole" here.
Similary it is said that the circle $S^1$ has a $1$-dimensional hole.
But isn't this hole regarded from common sense $2$-dimensional?
Essentially this "hole" is the removed inner of a $2$-disc $D$ where
$S^1 = \partial D$. Can somebody clarify the 'logic' behind the
"dimension" of the holes in this setting.
Even more confusing is the notation of a hole for a torus $T$. According to
the 'logic' above a $k$-dimensional hole of a $k$-simensional
"surface" is the 'removed inner mass' which as observed in examples
before seemingly should be always contractible to a point.
But in case of torus the $1$-hole is not even contractible, since
it is homotopic to $S^1$.
That's confusing. Is it possible at least just for these two quite simple examples to precisely define what a $k$-hole is?
 A: Briefly, the dimension of the hole is the dimension of the "witness" needed to detect it.
In a bit more detail, when we talk about a $k$-dimensional hole in a space, it just means that you need a $k$-dimensional closed submanifold to detect it. It's often sufficient to use $k$-dimensional spheres $S^k$ to do this---note that a $0$-sphere is just a pair of points $S^{0} = \{N, S\}$, which I'll call north and south, respectively. A sphere has no boundary (in the manifold sense), so it is always a cycle. The idea used to detect a hole is to draw a $k$-sphere enclosing the hole, and try to "colour it in" to get a $k+1$-ball.  If this is impossible, then you have found a $k$-dimensional cycle which is not a boundary, and hence a nontrivial element of the $k$th homology group.
For example, consider $\mathbb{R} \setminus \{0\}$. The hole here can be detected by drawing a $0$-sphere enclosing the origin (i.e. such that $S < 0 < N$). Clearly you cannot "colour in" the $0$-sphere to get a $1$-ball (i.e. an interval). Hence, this $0$-sphere is a nontrivial element of $H_0$, and witnesses the existence of the $0$-dimensional hole or "cut" in our space.
Now consider $\mathbb{R}^2 \setminus \{0\}$. We have a $1$-dimensional hole or "tunnel" at the origin here, since you need a loop (i.e. a map $S^1 \to \mathbb{R}^2 \setminus \{0\}$) to detect this hole. You just draw the loop so that it encloses the hole, and the fact that this loop can't be filled to make a disk witnesses the existence of a $1$-dimensional hole.
On the other hand, consider $\mathbb{R}^3 \setminus \{ 0 \}$. Now a loop will no longer suffice to detect the hole, since it won't get "stuck" on the hole as you contract it. On the other hand, if you draw a $2$-sphere $S^2$ enclosing the origin, then that $2$-sphere cannot be filled in, hence witnessing the existence of a $2$-dimensional hole or "cavity" at the origin.
The same principle applies to higher-dimensional holes: a closed $3$-submanifold is needed to detect a $3$-dimensional hole, etc.
Since you asked about the Torus: this has just one connected component (no cuts), so $H_0$ is $1$-dimensional as a $\mathbb{Z}$-module. Then it has two 1-dimensional holes, witnessed by two circles:

For the 2-dimensional hole or "cavity", rather than using a 2-sphere as a witness, we can use the torus itself! The torus is of course a 2-submanifold of itself. Since it has no boundary, and you cannot "fill in" the torus, then this witnesses the existence of the cavity inside.
A: The "dimension" of a hole is the dimension of the part that actually exists. For a sphere, then, we have a $2$-dimensional boundary, which is missing a $3$-dimensional ball inside it. We call that a $2$-dimensional hole.
Similarly, for a circle, we have a $1$-dimensional boundary which is missing a $2$-dimensional disk inside it. So that's a $1$-dimensional hole.
Now for a torus. We have two $1$-dimensional holes -- that is, circles which don't bound disks
(do you see what they are?). We also have a $2$-dimensional hole. That is, a $2$-dimensional surface (the torus itself) which isn't the boundary of a $3$-dimensional surface. This is the "air" inside the inner tube.
In general, an "$n$-dimensional hole" is an $n$-dimensional (boundaryless) subcomplex which is not the boundary of an $n+1$-dimensional subcomplex. Notice how this can be formalized with the standard language of homology, where an element of the $n$th homology group is a cycle that isn't a boundary.

I hope this helps ^_^
A: I'm not sure if this adds much to the other answer, but here are some thoughts from someone who got into topology fairly recently.
First of all, the concept of homology representing $k$-dimensional "holes" is not necessarily meant to be precise. It is a good perspective for understanding homology, but often in topology it's not worth the effort of converting algebraic data to literal geometric data (especially since we can't visualize higher dimensions anyway).
That said, here is my perspective. By definition, homology groups are "cycles mod boundaries." You can think of a "cycle" as a "boundary of a hole." The question is whether that hole is filled in or not inside the space.

*

*For concreteness, consider the $2$-torus $T$.

*Any circle $S^1$ inside of $T$ represents a $1$-cycle, but, in general, this circle may or may not be "filled in."

*

*If you pick a small circle lying on the surface of the torus, then the circle is "filled in" in the sense that it bounds a $2$-disk. In this case, the circle (a cycle) happens to be a boundary (of a $2$-disk), so this represents a trivial homology class.

*If you pick a circle which goes around the inner tube (as @HallaSurvivor called it), then you have a $1$-cycle which cannot be filled in. That means the circle is not the boundary of any $2$-disk in $T$. This cycle therefore represents a non-trivial homology class in $H_1(T)$.



Of course, the "hole" bounded by this circle is not part of $T$. For this reason, it doesn't make sense to talk about the dimension of the actual missing part. For example, consider $X=\Bbb R^2\setminus\{(0,0)\}$. The unit circle represents a nontrivial class in $H_1(X)$, but the missing "hole" is just a point. In fact, $X$ is homotopy equivalent to $S^1$, so the actual homotopy invariant is the dimension of the cycle, not the missing hole.
A: The other answers are good at explaining how to think about the standard theory, but missing some discussion on why this formulation is preferable I think.
The punchline for your intuition: It is understandable to visualize topological spaces as subspaces of Euclidean space. But you should be aware where this breaks down. Why is the "hole" in a sphere not the void in the middle? Because if the world is a sphere and nothing else, the "void in the middle of a sphere" does not exist to discuss.
Say that we want to formulate a theory of holes in spaces. Before writing down any formal encoding, we need to be precise about what we mean by "hole", and it seems like there are two options to start us in that direction:

*

*A hole is a void where material could have been.

*A hole is a circle which is not filled with material.

These ideas are subtly different. To specify a hole in Version 1, we must say what material constitutes the void, and have a condition that allows us to say "that material is missing". Version 2 is the standard version. It specifies holes using circles, and everything we use to talk about holes in homology, including their dimension, is predicated on this.
To be more precise for Version 1, this approach may drive us to say: "A topological space $Y$ has a $k$-dimensional hole if $Y\subseteq X$ and there is a $k$-dimensional $U \subseteq X - Y$ with $\partial U \subseteq Y$." This was not an unreasonable starting point, but thinking carefully about it there is not clearly a workable theory to be had. Even if there were, the theory is "extrinsic": To specify a hole in $Y$, we must embed it in a bigger space $X$. By referencing a bigger space, we have made our job formalizing this theory a lot harder. Does our homology theory depend on the embedding? We no longer have $H_k(Y)$, we have $H_k(Y\subseteq X)$.
In version 2 (the standard approach), to specify a hole we provide a "witness": A circle in the space which is not filled. This theory is "intrinsic": A hole in $Y$ can be specified using only $Y$ without reference to anything else. A topological space $Y$ has a k-dimensional hole if there is a k-dimensional circle (better: a k-dimensional cycle) in $Y$ that lacks material in $Y$ filling it.
