When something nearly happens, it comes very close to occurring, but doesn't. Nearly is a useful adverb for describing things that are almost accomplished.
If you and your brother nearly win the three-legged race, you lose by a matter of seconds. And, if you nearly drop your dog's leash at a busy intersection, your heart might pound from the closeness of your best pal's brush with danger. An interesting detail about nearly is that it nearly ended up with a different meaning: until the late 1600s, in fact, it meant "carefully."