Planck resolved the ultraviolet catastrophe by proposing that the energy of electromagnetic waves is quantized, meaning it can only be emitted or absorbed in discrete packets called quanta. This resolved the divergence between classical theory, which predicted infinite radiation intensity at high frequencies, and experimental results. Planck proposed that an oscillator absorbing or emitting radiation could only change its energy in integer multiples of hf, where h is Planck's constant and f is the frequency. This quantization of energy explained the observed emission spectra. While Planck could not explain why energy should be quantized, his discovery laid the foundation for quantum theory and modern physics.