Dear Student
Metallic oxides are basic in nature because they react with dilute acids to form salt and water. They also react with water to form metal hydroxides which are alkaline in nature because these metal hydroxides release OH- ions in solution.
On the other hand, if you look at non metallic oxides, they react with water to form acidic solutions which liberate H+ ions in solution. Therefore, non metallic oxides would be acidic in nature.
So sodium and magnesium form basic oxides while carbon and sulphur form acidic oxides.
Regards