Index and Pins --- Skewers --- Double attacks --- Knight forks
Discovered attacks --- Deflection --- Back rank mates
Back rank problems: a common weakness
It's usually a very good thing to castle; you connect your Rooks, and you make your King a bit safer in its own little fortress. But castling does bring with it one potential weakness, and that is a vulnerability to mating attacks along the back rank. Here are some examples, and a tip on how to forestall such attacks.
A basic position

Here we go. The Black King is castled; but one pair of Rooks has been exhanged in the game, and in consequence the Black King has lost the protection of his Kingside Rook.
White mates in one move by taking his Rook to e8.
Re8+, and it is mate.
Deflecting the guard of your back rank

Black has the choice of losing his Queen, or moving her out of the way - which gives the Rook a free run to e8, mating the Black King.
Exploiting a weak back rank (1)

- Taking the Queen allows mate in a couple of moves, starting with capturing the Rook on a1: Rxa1+ and White is soon checkmated.
- Taking the Black Rook (Rxa2) allows the Queen to take the b1 Rook, again checkmating next move
- Guarding the Rook with Qd1 removes the White Queen's protection from f2... and Qxf2+ leads to yet another mate
Exploiting a weak back rank (2)
Black's back rank seems very well protected, but this turns out to be an illusion, as White can play his rook to a7. If the Queen takes it, then White mates in two moves starting with Qd8.
The Queen clearly cannot abandon the protection of d8, and therefore has to move to b6. White, however, has the stunning reply Rb7 (diagram 2) and whatever Black does he either loses his Queen or is checkmated on the back rank.
- If 1...Qxb7 or 1...Rxb7, then 2. Qd8+ wth mate to follow
- If 1...Qa5, 1...Qa6, 1... Qc5, or 1...Qd4 then 2. Rxb8+, again mating
- Other moves simply lose the Queen


A bolthole for your King (from Black's point of view)

There are things you can do to lessen the risk of falling victim to back rank mates, and the most common is to make some breathing space for your King.
An opportunity to do this comes up in most games where your opponent brings his Bishop to g5 (or b5) with a view to pinning your Knight. You will often chase the Bishop away from this square by moving your h-pawn, and this has the added bonus of creating a bolthole for the King after you have castled.
Index and Pins --- Skewers --- Double attacks --- Knight forks --- Discovered attacks --- Deflection --- Back rank mates