N has 5 outershell electrons
In NH3 N shares 3 electrons with H
2 electrons are not bonded with
So there are 3 bonding pairs and one lone pair of electrons
Lone pair - bond pair repulsion is greater than bond pair - bond pair repulsion
So they arrange in a way that minimizes repulsion forming a trigonal pyramidal shape