The ideal class group problem is one of the very interesting problems in algebraic number theory. In this thesis we focused on quadratic fields. We studied the group of units of the rings of algebraic integers and calculated fundamental units in several quadratic fields. We also studied a detailed proof of the analytic Dirichlet class number formula with numerical examples and its relation to binary quadratic forms. In addition, we also presented a detailed proof of Carlitz's theorem with numerical examples.