I have plotted the density of states using GGA-PBE exchange correlation functional for magnesium silcide but I really do not know what the equations involved are in this process, and how they relate to DFT?
From the Wiki page, the density of states (DOS):
In solid state physics and condensed matter physics, the density of states (DOS) of a system describes the proportion of states that are to be occupied by the system at each energy. The density of states is defined as $D(E) = N(E)/V$, where $N(E)\delta E$ is the number of states in the system of volume $V$ whose energies lie in the range from $E$ and $E + \delta E$.
The DOS is not directly linked to DFT, it is a solid state concept about how the electrons are energetically distributed. The DFT is the method used to calculate it (there are other method that can be used).