The electronic structure and magnetic properties of Mn-substituted II-VI diluted magnetic semiconductors are treated theoretically with emphasis on Cd1-xMnxTe. The derived electronic structure is based on a combination of ab initio spin-polarized band calculations, a semiempirical tight-binding model containing the relevant experimental input, and consideration of alloying effects. The magnetic properties are calculated using a multisite Anderson Hamiltonian incorporating the derived electronic structure. The derived sp-band Mn-d and Mn-Mn exchange constants compare as well with experiment as any previous calculations of this kind. The results establish the importance of sp-d hybridization and demonstrate superexchange as the dominant Mn-Mn exchange mechanism. A phenomenological three-level model for superexchange is constructed, which gives results in excellent agreement with the detailed calculations, provides physical insight, and permits exploration of chemical trends in the magnetic behavior for the series M1-xIIMnxXVI (MII=Cd or Zn; XVI=Te, Se, or S). The same model, with minor modification, is found to be applicable to MnO and -MnS, which are insulating and have the rocksalt structure.