I've been studying the classic results in integer binary quadratic forms, mainly the equivalence and reduction of quadratic forms and the class number $H(d)$ (the definition I got for $H(d)$ is the number of equivalence classes of binary quadratic forms of discriminant $d$, for a non perfect square $d$), and I was wondering if someone could explain or give me a good reference for the connection between this function $H$ and the theory of ideals, quadratic fields and modern algebra.
Thank you.