The following thesis contains an extensive account of the theory of class groups. First the form class group is introduced through equivalence classes of certain integral binary quadratic forms with a given discriminant. The sets of classes is then turned into a group through an operation referred to as "composition''. Then the ideal class group is introduced through classes of fractional ideals in the ring of integers of quadratic fields with a given discriminant. It is then shown that for negative fundamental discriminants, the ideal class group and form class group are isomorphic. Some concrete computations are then done, after which some of the most central conjectures concerning the average behaviour of class groups with discriminant l...