Here's why:
* Nitrogen's valence electrons: Nitrogen has 5 valence electrons.
* Bonds with hydrogen: In ammonia, nitrogen forms three single bonds with three hydrogen atoms. Each bond involves sharing one electron from nitrogen and one from hydrogen.
* Remaining electrons: This leaves two of nitrogen's valence electrons unbonded. These two electrons form a lone pair.
You can visualize this with a Lewis structure:
H
|
H - N - H
|
H
The two dots on the nitrogen represent the lone pair.