When metals and non-metals react the metal element loses it's electron to the non-metal which result in it becoming positively charged (cation) while the non-metal who has gained more electrons than the proton in it's nucleus thus off-setting the neutral balance become negatively charged. Once this happens, the ions become attracted to each other (opposites attract) and result in them forming very strong IONIC BONDS.