I am currently learning some aspects of the theory of complex multiplication for elliptic curves, and the relationship with class field theory.
As I understand it, there is a very special class of elliptic curves $E$ whose automorphism rings are ideals $\mathfrak{a}$ of $\mathcal{O_K}$, the ring of integers of an imaginary quadratic field $K$. And conversely, for every ideal $\mathfrak{a}$ in an imaginary quadratic field $K$, there is an elliptic curve whose endomorphism ring is $\mathfrak{a}$. The correspondence goes by viewing $E$ as $\mathbb{C}/\Lambda$ for some lattice $\Lambda$, and the endomorphism ring as the set of complex numbers $z$ such that multiplication by $z$ maps $\Lambda$ into itself.
These special curves give an explicit version of class field theory for $K$: the Hilbert class field is generated by the $j$-invariant of a $E$, and the rest of the maximal abelian extension is generated by numbers determined by the $x$-coordinates of torsion points on $E$.
How does this generalize to the world of abelian varieties? I am dimly aware that the idea of complex multiplication is well-defined for an abelian variety $A$. Loosely, this corresponds to the case when the endomorphism ring of $A$ is larger than "expected", and this is related to some algebraic number field in a somewhat similar way to the above relationship.
What does this look like on the class field theory side? Does it give an explicit class field theory for more general types of fields than imaginary quadratic fields? Or does it correspond to something more exotic - some Langlands-y analogue of class field theory for non-abelian extensions?
I'm also vaguely aware that "explicit class field theory" in a form analogous to the case of complex multiplication has been developed for CM-fields, which are imaginary quadratic extensions of totally real number fields. Is this related to higher-dimensional abelian varieties?