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.