Hybridization of nitrogen in a ring
If an $\alpha$-$\beta$ unsaturated heteroatom isn't already participating in a $\pi$-bond and it has a lone pair of electrons, these electrons will be delocalized and in the $\mathrm{p}$-orbital.

Let's compare pyridine and pyrrole:

$\hspace{5cm}$

The nitrogen in pyridine is already participating in a double bond, so it is clearly $\mathrm{sp^2}$ hybridized. The nitrogen in pyrrole is $\alpha$-$\beta$ unsaturated, so its lone pair is delocalized. Both of these molecules are heterocyclic aromatic rings, but these are not the only cases in which a nitrogen atom's lone pair are delocalized. They are also delocalized in amides (which resemble the $\alpha$-$\beta$ unsaturation of pyrrole):

$\hspace{4.6cm}$

If you want to know more about criterion for aromaticity, read about Hückel's rule.