The aim of this talk is twofold. The first is to introduce the reader to some old results on Markoff and Lagrange spectra, which are not so well known. Particularly, we tried to put the emphasis on the idea that both spectra share strong common properties and that minima of quadratic forms and homogeneous diophantine approximation in one variable are deeply linked. The second is to show that natural generalizations of such objects have natural interpretations in geometrical terms, and that this geometry can be used to recover and generalize some of the results of the first part. We tried to keep the algebraic requirements to a minimum, so we explain what an ideal class group is and why it arises in a natural way in such a problem.