Serial port pinouts
Fig's 1&2 show the more common 9 pin serial pinouts, on both the computer side and also the device side respectively. Fig.3 gives a more visual representation of the male variant, most commonly found non the PC side. I think this was historically due to a male being more prone to damage, hence the female end being more commonly used on cables, but I may be wrong.
Fig.5 is particularly useful when testing cables, although I have only really connected pints 2&3 for this purpose. The idea here is that you make a plug that connects the pins together and then you can open the port and whatever you type should be echoed back exactly.
Fig's 6-10 provide details about Null Modem connectivity.
Fig.11 provides more pinout details for the DB25 connectors