When magnesium nitrate and sodium carbonate react, they form the precipitate magnesium carbonate. This can be represented by the following chemical equation:
Mg(NO3)2 + Na2CO3 → MgCO3(s) + 2NaNO3
The magnesium carbonate precipitate is insoluble in water, so it will settle out of the solution. The sodium nitrate is soluble in water, so it will remain in the solution.