Have you ever been unsure about whether you're on a date or not? Let's say you're at an ice cream parlor sharing a milkshake with another person you like a lot — one milkshake, two straws. Each of you sips the chocolate malt through your own straw, your heads touching.
Of course this is a date — the oldest date in the book. Let's call it a covalent date.
But how about when you're sitting on a bench, looking at the sunset with somebody you feel undeniably attracted to. One of you is eating an apple, and suddenly the apple eater turns to the other and says, "I can't finish this — do you want it?" and the other, being kind of famished, says "I thought you'd never ask!" and starts eating the apple with the spit all over it.
This is perhaps a less romantic date, but it's still essentially a date. We'll call it an ionic date.
We have the stuff we have here in our universe — rocks, air, grass, puppies, slime molds — because of the tendency of the atoms in our universe to want to form bonds with each other — to go on dates, to hitch their wagons to each others' stars. The truth is, atoms, much like people, want to chill — want to work as little as possible. Combining forces with another atom or molecule can often help a stressed-out atom relax. Thanks to electrostatic force, through which opposite charges (positive and negative) will attract one another, while like charges (positive and positive or negative and negative) will repel, the negatively charged electrons of one atom are always going to be attracted to the positively charged protons in the nucleus of another, and vice versa.
It should be noted that, because atoms of different elements are more or less stressed out, depending on where they land on the periodic table, atoms are going to have different partnership needs depending on what element they are. Therefore, there are two different types of bonds atoms can form to make molecules, and they are pretty similar to the two kinds of dates described above.
Covalent bonds are formed when nonmetals form compounds with each other by sharing electrons between them. This works best when the atoms in question have similar electronegativity values, which is to say the strength with which they each attract other atoms and hold shared electrons is pretty equal. This is not always the case, however.
Take, for instance, the most famous covalent bond in history, the platonic ideal of the milkshake-sharing date: water. An oxygen atom will always be happy to share its milkshake with hydrogen — two hydrogens, actually — because it needs two electrons in its outermost electron shell to achieve its lowest, chillest energy state. Similarly, without oxygen, the hydrogens are just wandering around lost with a single electron to keep them warm at night. So they team up, but the relationship is not an equal one — because the electronegativity of oxygen is considerably higher than that of the two hydrogens, the hydrogens happily share electrons with the oxygen, but the oxygen is the one that uses the electrons most of the time. This is called a polar covalent bond because even though the molecule itself is neutral, the electrons spend so much time hanging out around the oxygen, the side with the hydrogens is more positive and the side with the oxygen is more negative.
Ionic bonds are formed when one ion — an atom or molecule with a net charge, either positive or negative — finds another ion of the opposite charge to bond with, creating an overall neutral ionic compound. Metals are elements that lose electrons during chemical reactions, which causes them to form positive ions. Holding an extra electron or four is very stressful in the way that standing around with too many shopping bags full of groceries, waiting for somebody else to open the door to the apartment is stressful. It's helpful to be able to hand over some of your load to a buddy.
For instance, if you're a metal like a sodium atom, sitting around with a single, lonely electron on your outer electron shell, a more stable, less stressful situation would involve approaching the (nonmetal) chlorine atom across the room who is missing just one electron to make it entirely happy, and entering into a marriage of convenience that we call table salt (NaCl).