Nitrogen has 5 valence electrons in its outer shell. Each Hydrogen has 1 valence electron in its outer shell, so the 3 Hydrogens donate 3 electrons in total. This gives 8 valence electrons in total. We can then divide this by 2 to calculate the number of electron pairs around the central nitrogen atom. As there are 4 valence electron pairs around the nitrogen, but only 3 Hydrogens, then we have 1 pair of electrons left over. (As a covalent bond, N-H in this example, requires 1 electron pair.) This left over pair of electrons is said to be a lone pair.
Each pair of electrons will repel the other pair of electrons, so the electron pairs will try and be as far away as possible from each other. As there are 4 pairs of electrons, we could say that the angle between them would be 109.5o. However, the lone pair that was left over actually repels more than the other pairs of electrons, so the actual angle between the hydrogens would be slightly less than this at ~107o.
The shape of the NH3 is referred to as trigonal bypramidal, as while the electron pairs are arranged tetrahedrally, the lone pair is considered to be invisible and so the NH3 does not look tetrahedral.