First, I think you mean $\pi_1(X)$ in your second paragraph. What you describe is only true for $\mathbb{R}^2$ (and homeomorphic spaces), basically: it is true that the fundamental group of $\mathbb{R}^2$ with $k$ points removed ("holes") is the free group on $k$ letter. But for other spaces that's not the case anymore... For example if you remove a point from $\mathbb{R}^n$ you get a space homotopy equivalent to $S^{n-1}$, and if $n \ge 2$ this space has a trivial fundamental group...
I think the "best" intuition you can get here is from the definition, IMO: you're looking at loops based at a point, and you identify homotopic loops. You can't go wrong if you look at the $\pi_1$ in this way. In general thinking about it in terms of "holes" and whatnot can be useful in some cases, but can also lead to errors in other cases.
Now, homology is not the abelianization of the homotopy groups! You're probably thinking of the Hurewicz theorem. It states that yes, if the space is connected then $H_1 = \pi_1^{ab}$. Similarly if $\pi_0 = \pi_1 = \dots = \pi_{n-1} = 0$, then $H_n = \pi_n^{ab}$. But now you should think something is fishy. Indeed, the higher homotopy groups, $\pi_{n \ge 2}$, are always abelian! So homology wouldn't be very interesting if it were just the abelianization of the homotopy groups. The theorem only holds true for the first nonzero homotopy group, after that all bets are off.
Let's look at two examples.
- The spheres have very simply homology:
$$H_i(S^n) = \begin{cases}
0 & i \neq 0 \text{ and } i \neq n \\
\mathbb{Z} & i = 0 \text{ or } i = n
\end{cases}$$
You might expect the homotopy groups to behave simply too, if after all homology is just the abelianization of homotopy... As it turns out, computing the homotopy groups of spheres is an open problem! You can look at a table for small values here. There are no readily apparent patterns besides the suspension isomorphism, if you don't know what to look for. (Well, there are actually some patterns, but the fact that these patterns exist are big theorems from homotopy theory...)
- The Eilenberg–MacLane spaces have very simple homotopy. For a given abelian group $A$:
$$\pi_i(K(A,n)) = \begin{cases}
0 & i \neq 0 \text{ and } i \neq n \\
A & i = 0 \text{ or } i = n
\end{cases}$$
Once again you might expect their homology to be simple. And once again that's not the case. For example $K(\mathbb{Z}, 2) = \mathbb{CP}^\infty$ is the infinite-dimensional complex projective space, and its homology has infinitely many nontrivial parts!
There is such a thing as a "homology theory". The axioms are very similar to the axioms for a cohomology theory, except the arrows are reversed. In fact, every cohomology theory yields what is called a "spectrum" (don't worry if you don't know what that is), and every spectrum has an associated homology theory. So for example singular cohomology corresponds to singular homology, K-theory corresponds to K-homology, etc.
As for the overall question, the goal of homotopy/homology/cohomology is to assign "invariants" to topological spaces. Spaces are complicated beasts, and we can't really hope to understand them as it is. So we build what are called "invariants" to try to understand parts of it in order to try to understand the big picture.
Maybe this analogy will be helpful: imagine you've got an object that you know nothing about. You can look at it with your eyes, you can take an X-ray of it, you can smell it, you can touch it and see how it feels... And all this starts to form a coherent picture and you can know a lot of things about the object in this way. That's more or less what we're doing here: look at an object from all sorts of point of views to try to understand it better. And since it's difficult to smell what a sphere is, people invented mathematical constructions to try to understand them.
As for a more mathematical motivation for (co)homology and the specific aspects of the space they represent, I can refer you to:
A possible way to look at cohomology is that you take a cell complex (for example), and you look at functions that assign elements of a given group to these cells. AFAIK it takes its roots in obstruction theory: you have a given map $f$ on the $k$-skeleton, and you want to extend it to the $(k+1)$-skeleton. The map $f$ naturally assigns elements of $\pi_k$ to each $(k+1)$-cell, and it gives you a cocycle. This is the very rough beginning of the construction of the Serre spectral sequence. Looking at things like Poincaré duality could be helpful if you want to understand cohomology and you already know homology.