Ah blackbody radiation

The reason for the shape of the black-body curve, where it dies out at high and low frequency, leaving a peak in the middle, is due to two separate things. I'll explain each one.
In a blackbody containing EM waves, the waves in the blackbody is modelled as standing waves in a box. At higher frequency, EM waves have lower wavelength, so more waves can be squeezed into the box. Classically, there is no limit on how much EM wave can fit into the box, as the energy carried by them does not depend on their frequency/wavelength, which led to the Ultraviolet Catastrophe where the intensity blows to infinity as frequency goes up, predicted by Rayleight-Jeans. On the other hand, for EM waves with low frequency and high wavelength, fewer can be fitted into the box, hence the blackbody curve dies down to zero when frequency goes to zero.
To resolve the Ultraviolet Catastrophe, Planck has to introduce the notion that for each frequency of light, atoms can only absorb and emit discrete amount of energy given by the formula
E = hf, which is now known as the energy of the photon. Meaning that at high frequency, the atom either have a absorb a high amount of energy, or don't absorb it at all, there is no in between. And the larger the jump in energy, the less likelihood the atom will absorb the energy.
Hence at higher energy levels, even though more wave can be squeezed into the box, the atoms in the blackbody is deterred to make such a jump to such high amount of energy needed. This suppresses the infinite growth in intensity and presses down to zero at high frequency.