In his book The Art of Sacrifice in Chess, Rudolf Spielmann distinguishes between real and shamsacrifices. A sham sacrifice leads to a forced and immediate benefit for the sacrificer, usually in the form of a quick checkmate (or perpetual check or stalemate if seeking a draw), or the recouping of the sacrificed material after a forced line. Since any amount of material can be sacrificed as long as checkmate will be achieved, the queen is not above being sacrificed as part of a combination.
Possible reasons for a sham queen sacrifice include:
a forced checkmate after the opponent takes the queen;
more than adequate material compensation (say, a rook and two knights) after a forced continuation;
the subsequent capture of the opponent's queen, resulting in some positional or material gain.
On the other hand, "real" sacrifices, according to Spielmann, are those where the compensation is not immediate, but more positional in nature. Because the queen is the most powerful piece (see chess piece relative value), positional sacrifices of the queen virtually always entail some partial material compensation (for example, sacrificing the queen for a rook and bishop).
An opportunity may arise where a player trades off his queen for other pieces which may together be of equal or greater value than the queen. Bent Larsen remarks that giving up the queen for a rook and two minor pieces is sometimes called a "queen sacrifice", but since a rook plus two minor pieces is more valuable than the queen, he says it should not be considered a sacrifice.
A celebrated game by Adolf Anderssen, the Immortal Game, featured a queen sacrifice as part of White's final mating combination. In the diagram position Anderssen gave up his queen with 22.Qf6+! to divert Black's knight: the game continued 22...Nxf6 23.Be7#. This is an example of a sham queen sacrifice, as the sacrifice resulted in checkmate only one move later. White was able to mate since his minor pieces were clustered around the Black king, while Black's pieces were either undeveloped or trapped in the white camp and so unable to defend.
In another celebrated game by Anderssen, the Evergreen Game, Anderssen once again sacrificed his queen for a mating combination, playing 21.Qxd7+!!. The game continued 21...Kxd7 22.Bf5+ Ke8 23.Bd7+ Kf8 24.Bxe7#. The game is another example of a sham queen sacrifice. Although Black is on the verge of checkmating White, his defences around his king are weak, so White was able to mate.
For an example of a "real" (positional) queen sacrifice, Rudolf Spielmann presented this game against Jorgen Moeller in Gothenburg 1920. In the first diagram Black threatens 9...Bg4 winning the queen, since it must not leave the f2-square unguarded under threat of checkmate. But Spielmann played 9.Nd2! allowing Black to win his queen, and after 9...Bg4 10.Nxe4 Bxf3 11.Nxf3 Qh6 12.Nf6+ Kd8 13.h4 the position in the second diagram was reached. White has only a knight and bishop for his queen and pawn, but his minor pieces are very active and the black queen is out of play. White won on move 28.
A queen sacrifice can sometimes be used as a resource to draw. Here Herman Pilnik (White) is defending an endgame three pawns down, but played Qf2!, when Samuel Reshevsky (Black) had nothing better than ...Qxf2 stalemate.
In The Game of the Century, Bobby Fischer uncorked a sham queen sacrifice to obtain a winning material advantage. In the first diagram, White's king is stuck in the center and Black has control of the open e-file. Fischer ignored the threat to his queen and played 17...Be6!!. The game continued 18.Bxb6 Bxc4+ 19.Kg1 Ne2+ 20.Kf1 Nxd4+ 21.Kg1 Ne2+ 22.Kf1 Nc3+ 23.Kg1 axb6 24.Qb4 Ra4 25.Qxb6 Nxd1 and Black has emerged with a large material and positional advantage. He can threaten back-rank mate to win even more material; his pieces are coordinated and White's rook is trapped in the corner. Black went on to win the game.