By way of introduction, let us first consider the simplest aromatic base, aniline:

As you can see, aniline has resonance forms which lower the energy of the normal form of aniline.  This resonance is allowed because the nitrogen lone pair is in an sp2 hybridised orbital, and can therefore overlap with the pi orbital system of the benzene ring.

However upon protonation, no resonance stabilisation is available:

The net effect of this is that it is energetically unfavourable to protonate aniline, and hence it is a weak base.

We can further reduce basicity by the addition of more Ph groups: NPh3 is not basic at all.  However, NPh3 also has steric compression lowering its basicity.

This is because, when the nitrogen atom is protonated, its coordination (as mentioned before) changes from sp2 to sp3, and hence the interbond angles change from 120º to 109º, thus bringing the bulky Ph groups closer together, and increasing steric compression, which also lowers the tendency to act as a base for this molecule.

We can add ring substituents onto aniline, and note the effect of electron withdrawing, and electron donating groups:

The nitro group is strongly electron withdrawing, and thus nitroaniline (left) is less basic than aniline.  The position of the nitro group affects the basicity because the nitro group has an inductive effect as well as a mesomeric effect.  This means that the ortho and para positions we would expect to be the least basic (as the mesomeric effect can only work if the nitro group is in these positions), and that meta-nitroaniline should be more basic than the others because in this position, only the inductive effect works.  All three nitroanilines are less basic than aniline.

Adding methyl groups to the ring increases basicity, as we can predict, because we know that the methyl group is electron releasing, and hence reduces the effectiveness of the resonance of the nitrogen lone pair and the ring.

The presence of the amino-group on the benzene ring of aniline activates the ortho and para positions significantly.  This can be seen if we treat aniline with an excess of bromine water, because of the very rapid formation of a precipitate of 2,4,6 tribromoaniline:

Overall, we can summarise the effects on the basicity of aniline by saying that electron donating groups on the ring increase the basicity, and electron withdrawing groups decrease the basicity.