Rayleigh–Jeans law How did Planck solve the UV catastrophe? From online sources, I've seen that this had to do with quantization of energy. Somehow I cannot wrap my head around this. 
Can any of you please explain? Thank you for your time :)
 A: If you are asking for "how did Planck get the idea to use quantization of the energy".
This has been already answered here in the comments to the answer.
Given that you are new to SE, I am quoting it here :- 
"Planck was not trying to explain away the ultraviolet catastrophe, which in fact was not understood until Ehrenfest's work in 1911. It wasn't until well after the understanding of the quantization of EM modes that people realized the problems with the classical approach, giving an after-the-fact justification for QM. Planck was simply trying to theoretically understand a phenomenological result, not to resolve any deep problem with (what we now call) classical physics."
"He just thought it was a convenient math trick that simplified the calculation of the partition function, which approximated some continuous exact calculation. It wasn't until Einstein's explanation of the photoelectric effect five years later that people realized that EM radiation really is physically quantized." 
