A covalent bond forms when two atoms share electrons between their outer shells to satisfy the Octet Rule, which requires atoms to gain, lose, or share electrons until each has eight in their outer valence shell, matching the stable electron configuration of noble gases. For example, phosphorus shares electrons with other atoms because it has only five in its outer shell, while gaining three more allows it to match the full outer shell of the noble gas argon.