The octet rule states that atoms tend to combine with other atoms to obtain the electron configuration of a noble gas.
The octet rule is valid for atoms with atomic numbers under 20 (i.e. up to calcium).
Atoms tend to achieve the noble gas electron configuration as it is very stable.
Noble gases are usually found as atoms and do not react easily, which reflects the stability of their electron configuration.
There are lots of exceptions to the octet rule, but it is useful for understanding the way that many simple ions and covalent compounds form. Atoms usually donate, receive, or share electrons in bonds in order to satisfy the octet rule.