The endomorphism ring of an elliptic curve is either $\mathbb{Z}$, an order in a quadratic field, or an order in a quaternion algebra (ranks $1,2$, and $4$, respectively).