Atoms bond to reach a full outer shell of electrons. They do this by transferring or sharing electrons. A bond is not a physical thing. It is the result of electrostatic forces, the attraction between positive and negative charges.
In ionic bonding, electrons are transferred from a metal atom to a non-metal atom. A sodium atom loses one electron and becomes a positive ion. A chlorine atom gains that electron and becomes a negative ion. The nucleus does not change, so the sodium ion still has 11 protons but now has 10 electrons, which gives it an overall positive charge. The oppositely charged ions attract each other by strong electrostatic forces. This attraction is the ionic bond.
In covalent bonding, two non-metal atoms share a pair of electrons. The shared pair is attracted to the positive nuclei of both atoms. This electrostatic attraction holds the two atoms together.