The ultraviolet catastrophe results from the fact that in classical mechanics the energy radiated by a black body should be the same for all frequencies. This poses a problem since there is no upper limit for the frequency of radiation, and hence summing the amount of energy radiated across all frequencies results in an infinite value. This is known as the ultraviolet catastrophe because at the time this problem was posed, ultraviolet radiation was the highest frequency radiation known.
Quantum mechanics resolves this issue by asserting that electromagnetic energy can only be emitted in finite packets known as photons and that the energy of a single photon is larger from high frequency photons than low energy photons using a relationship known as Planck's law. Because high frequency photons have higher energy, they are harder to emit and amount of high frequency radiation is subtantially lower than predicted by classical mechanics. Furthermore, summing the radiation emitted across all frequencies results in a finite value.
The term ultraviolet catastrophe has also been applied to similar situations in quantum electrodynamics in which summing across all energies results in an infinite value because the higher energy terms do not decrease quickly enough to create finite values.