Milk of Magnesia or sodium hydroxide is classified as base.
It supplies one of the basic definition of a base that it can produce OH- ions in the solution.
Though it is not as water soluble as KOH and NaOH, its basicity level is not as high as that of the two.
Magnesium Hydroxide due to its mildness can act as antacid. Magnesium hydroxide reduces stomach acid, and increases the amount of water water in the intestines which may induce defecation. It was termed milk of magnesia because of its milk-like appearance.