Arithmetic of quadratic forms