Nuclear spin coherence and relaxation dynamics of all constituent isotopes of an n-doped CdTe/(Cd,Mg)Te quantum well structure are studied employing optically detected nuclear magnetic resonance. Using time-resolved pump-probe Faraday ellipticity, we generate and detect the coherent spin dynamics of the resident electrons. The photogenerated electron spin polarization is transferred into the nuclear spin system, which becomes polarized and acts back on the electron spins as the Overhauser field. Under the influence of resonant radio frequency pulses, we trace the coherent spin dynamics of the nuclear isotopes $^{111}$Cd, $^{113}$Cd, and $^{125}$Te. We measure nuclear Rabi oscillations, the inhomogeneous dephasing time $T_2^*$, the spin coherence time $T_2$, and the longitudinal relaxation time $T_1$. Furthermore, we investigate the influence of the laser excitation and the corresponding electron spin polarization on the nuclear spin relaxation time and find a weak extension of this time induced by interaction with the electron spins.