Many important biomolecules behave as aromatics, even though they don't contain benzene. Histidine is a very common amino acid with a cyclic side chain. The bases in nucleic acids, DNA and RNA, are also aromatic.
Closer examination shows that these compounds follow some variation of Huckel's rules for aromaticity. The variations involve the inclusion of lone pairs in the pi bonding system.
Pyrrole is a five-membered ring with a nitrogen in it. It contains two C=C bonds. Pyrrole is aromatic. It usually reacts in a way similar to benzene, rather than like alkenes. But how does it fit the rules for aromaticity?
Pyrrole is cyclic. It is flat. Is it conjugated? It does have alternating double bond-single bond-double-single-lone pair. We have seen before that lone pairs can be conjugated with pi bonds. So, pyrrole is conjugated all the way around the ring. Counting the lone pair as a pair of pi electrons gives it an odd number.
a lone pair can act like a pair of pi electrons if the molecule will become aromatic as a result.
Does a lone pair always have to act as a pi pair? Pyridine is a six membered ring, exactly like benzene, except that one CH unit is replaced by a nitrogen. The nitrogen has a lone pair. Pyridine already has three pi bonds. It is flat and fully conjugated. Does the lone pair add in to the system and make it anti-aromatic?
It turns out it can't. There is already a pi bond on that nitrogen, so it would be difficult for the lone pair to occupy the same space, above and below the ring. Instead, the lone pair remains orthogonal to the pi system. It is in the plane of the ring, rather than above and below it. It completely avoids interacting with the pi system.
a lone pair can't act like a pair of pi electrons if there is already another pair of pi electrons on the same atom.