Male connector is with pins.
Female connectors is with holes.
Pin 1 on male connector corresponding to pin 1 on female connector (they are like in mirror).
A rule of thumb for DB9 and DB25 connectors is: If it's male it is likely to be a DTE, if it's female it's likely to be a DCE.
A DTE can simply be connected to a DCE connector but if you want to connect a DTE to DTE or DCE to DCE you will need to use a crossover cable.