What is it's purpose?
Stoke's theorem and generalizations of it.
Measuring n-dimensional holes. Creating invariants for objects. Measuring obstructions. You meet homology in linear algebra as a callow high-school student, though of course you're never told this.
Let x be in R^n, b be in R^m and consider the linear system of equations
This we think of as (part of) a complex
0-->R^n --A-> R^m ---> 0
think of R^m in degree 0, R^n in degree 1. Then the obstruction to there being a solution is in H_0 (this measures how far away from surjective A is), and the obstruction to uniqueness is H_1, the kernel of A. There will always be a unique solution if and only if H_0=H_1=0.
And a book I really like (for both homotopy and homology) is Allen Hatcher, Algebraic Topology, Cambridge University Press, 2002. Munkres, Elements of Algebraic Topology isn't nearly as cool, but does offer good chapters offering intuition for cycles (and later, cocyles and cup product).
You asked about homology, not cohomology (the term "homological algebra covers both); for the latter, another important motivation is handling intersections, e.g. of algebraic varieties in some projective space. These days Schubert calculus is once again very popular.
homology neasures the distance between a necessary condition for solving a problem, and a sufficient condition. i.e. one has a linear space of data and one wants to identify some crucial subspace V in it. if one has a necessary linear condition for data to belong to V, one uses it to define a larger space W. Then the quotient space W/V measures how far your necessary conditioin is from being sufficient for belonging to V.
e.g. a differential one form gdx + hdy may or may not be the total differential df of a function f. one necessary condition is that dg/dy should equal dh/dx, so the forms satisfying that condition form a space W ("closed" forms). in that space lives the subspace V of forms which do equal df for some f ("exact forms").
hence the quotient space of closed forms/exact forms is called a (co)homology group measuring the desired condition. it turns out to be equivalent to another dual problem, of measuring which loops in the domain of your forms are boundaries of algebraic sums of parametrized pieces of surfaces.
since that is not so geometric a condition, it is useful to ahve amore geometric one, the condition say that all loops can be shrunk to points implies that all loops are boundaries, and hence that all closed forms are exact.
the group measuring the geometric shrinking condition is called homotopy, and is more strict than homology.
the general technique of defining a set which encodes the failure of a necesary condition to be sufficient, and then trying to calculate it by relating it to other such sets, is so powerful that it now has avatars in many areas, topology, group theory, analysis, geometry, algebraic geometry, differential equations, abelian groups and modules, everywhere really.
perhaps it all started with the formula of euler V-E+F= 2. In general on a surface V-E+F encodes the property of whether every closed loop is a boundary. this is true p[recisely when V-E+F = 2, and not when it equals something else. in fact the space of closed loops on the surface which are not boundaries, has dimension 2g if and only if V-E+F = 2-2g.
Separate names with a comma.