Cohomology is an invariant of a Topological Space, formally ``dual'' to Homology, and so it detects ``holes'' in a Space. Cohomology has more algebraic structure than Homology, making it into a graded ring (multiplication given by ``cup product''), whereas Homology is just a graded Abelian Group invariant of a Space.
A generalized homology or cohomology theory must satisfy all of the Eilenberg-Steenrod Axioms with the exception of the dimension axiom.
See also Aleksandrov-Cech Cohomology, Alexander-Spanier Cohomology, Cech Cohomology, de Rham Cohomology, Homology (Topology)