The optical properties of the Cd0.4Mn0.4Te/Cd0.5Mg0.5Te heterostructure with quantum wells of 7 monolayers in thickness are studied. The temperature dependences of the integral intensity of luminescence of the barrier layer and quantum well and intracenter luminescence of manganese ions are determined, and the luminescence excitation spectra are measured. Numerous components corresponding to LO phonons of the CdTe, MgTe, and MnTe types are observed in the Raman scattering spectra.