$$\text{Mg}^{2+}+\text{EDTA}^{4-}\rightleftharpoons\text{MgEDTA}^{2-}$$
The equilibrium constant for this reaction is very large, indicating that the reaction proceeds essentially to completion. This means that all of the magnesium ions in the solution will be complexed by EDTA.
The complexation of magnesium by EDTA is important in a number of analytical applications. For example, EDTA is used to mask magnesium ions in order to prevent them from interfering with other reactions. EDTA is also used to determine the concentration of magnesium in a solution by titrating the solution with a standard solution of EDTA.