Why are metal oxides basic and non-metals' acidic or neutral
We have learnt that metallic oxides are basic nature. This is because the oxides of metals like $\ce{MgO}$ or $\ce{CaO}$ or $\ce{Na2O}$ form hydroxides in their aqueous solutions.
For example:
$$\ce{K2O + H2O -&gt; 2KOH}$$
$$\ce{MgO + H2O -&gt; Mg(OH)2}$$

But when non-metallic oxides dissociate into their constituent ions in water, they give $\ce{H+}$ ions in their aqueous solutions forming acids
For example:
$$\ce{CO2 + H2O -&gt; H2CO3}$$
$$\ce{SO3 + H2O -&gt; H2SO4}$$