A metal and a non-metal would exchange electrons with each other and become what is known as an ionic bond. Such as NaCl, Na+ which is a metal ion of the 1a group, and Cl- which is a non metal ion of the 7a group.
So atoms from elements in which there is a metal and a non metal would form an ionic bond.