Two very important bases in organic chemistry are pyrrole and pyridine.  These are heterocyclic bases.

Firstly, what is a heterocycle?  A heterocycle is a cyclic compound with a heteratom in the ring.  A heteroatom in this context is any atom other than carbon.

Pyrrole is a 5 membered ring containing a nitrogen atom:

Pyrrole has some signs of aromaticity, as we would expect from Huckel’s rule;  in pyrrole, there are (4n + 2) pi electrons.  There are two electrons contributed from the nitrogen atom, and two each from each double bond.

However, pyrrole is not as aromatic as benzen; the delocalised electron cloud is polarized towards nitrogen.

Pyrrole reluctantly protonates at the carbon next to the nitrogen:

It is important to note that pyrrole does NOT protonate at the nitrogen.  This is because the nitrogen bears a slight positive charge due to the incorporation of it’s lone pair in the aromatic system.  Pyrrole is barely basic at all; it has a pKa of around 0.

Another very important heterocyclic base is pyridine:

This molecule is also aromatic. The nitrogen (like all the carbons) is sp2 hybridised, and contributes 1 electron to the pi system.  Pyridine therefore has 6 pi electrons.

Pyridine has a pKa of approximately 5.2,  which makes it much weaker than tertiary amines.  This is due to the increasing s character of the nitrogen. In pyridine it is sp2 hybridised.  As the nitrogen orbital has more s character, the electrons in the hybrid orbital are held more tightly, and therefore they are less likely to be able to forma bond with a proton, hence the compound is less basic.

Hence the general trend for nitrogenous bases is sp3 > sp2 > sp.

cf. increasing acidity of alkanes < alkenes < alkynes.

Unlike pyrrole, pyridine protonates on the nitrogen atom, as the nitrogen lone pair is NOT delocalised into the pi system.