Special and general relativity are the framework for understanding how the universe functions when we are considering very large and/or objects which are approaching the speed of light. Quantum mechanics is concerned with how the universe functions over distances measured on the atomic and subatomic scale. There are two points to bear in mind with quantum mechanics:
1. It works, its predictions have been verified accurately thousands (if not more) times.
2. It is fiendishly complex and at times downright weird and as such very few cosmologists actually understand (in the truest sense of the word) all aspects of what is termed Quantum Mechanics.
The crux is that all electromagnetic waves carry energy and that a body emitting these waves must emit them so that they have a whole number of peaks and troughs. This enables us to use the wave equation, which is the relationship between, peak, amplitude and wavelength. Longer wavelengths such as microwaves and radio waves have a lower frequency. Conversely, gamma rays have the shortest wavelength and the highest frequency of all types of Electromagnetic waves.
An oven is a device which emits heat radiation, a star such as our sun is an object which emits the complete range of Electromagnetic waves. Each type of wave carries the same amount of energy irrespective of its wavelength, but there are only a set number of waves. However, it is theoretically possible to have an infinite number of waves depending on the object which is creating them. This means that all objects there is an infinite amount of energy, which is of course not possible.
In 1900 Max Planck suggested that the energy carried by Electromagnetic waves, (including the light we see by) comes in distinct lumps, he termed “quanta”. Just as it is impossible to have half an atom, or half a wave, you cannot have half of a quanta. You can have energy in quanta that are multiplied by a single denomination of energy, i.e. 1. Max Planck suggested that the minimum amount of energy that a wave can have is directly proportional to its frequency. In other words high frequency waves (those that have a short wavelength) have a larger minimum energy than low frequency waves (those that have a large wavelength).