Starting position
The moves 1.e4 e5 2.d4 exd4 3.c3 dxc3 4.Bc4 Bb4 — the Danish Gambit: White has given up a pawn, the bishop on c4 eyes f7, and Black's bishop has come out to b4. The pawn move 5.bxc3 attacks it.
The opponent's mistake
5...Ba5?? looks natural: the bishop escapes and pins the pawn on c3. But only the king defends the pawn on f7, and nothing defends the bishop on a5.
How the trap works
6.Qd5! — a double attack: together with the bishop on c4, the queen threatens mate on f7 and attacks the bishop on a5. Black covers f7 with the queen, 6...Qe7, and 7.Qxa5 takes the bishop. The check 6...Bxc3+ doesn't help: 7.Nxc3 — the bishop is gone for a pawn, and the mate threat remains.
1.e4 e5 2.d4 exd4 3.c3 dxc3 4.Bc4 Bb4 5.bxc3 Ba5 6.Qd5 Qe7 7.Qxa5
Result
An extra piece — a big advantage for White. It is a common mistake: many players retreat this way.
How to defend (as Black)
Play 5...Qf6: the queen covers f7, and if the pawn takes the bishop on b4, the queen takes the rook on a1.