Nothing turns the tables on a game of Hearts like a player shooting the moon-- it can be the difference between a win and a loss, and many a game has been won by the underdog after a successful attempt to shoot the moon, or capture all of the points available in a hand. While one generally tries to avoid taking points in a game of Hearts, managing to shoot the moon will either add 26 points to the score of everyone except for the shooter ("old moon" rules) or subtract 26 from the score of the shooter, depending on the scoring method used (if a choice is offered, the game is being played by "new moon" rules). There are different variations of Hearts that have different rules for shooting the moon, but the method of shooting remains the same, regardless of which variation you play.
Hide what you're doing
The first thing to realize when shooting the moon is just how important it is that other players not understand what you're doing until it's too late for them to stop it. The point at which shooting cannot be stopped by other players is the moment when you have a sequence of cards in your hand which cannot be beaten by any cards still left in play; for instance, if you have AK in spades, Q10 in diamonds (and the ace, king, and jack have been played) and ace through nine in hearts, there is nothing that anyone could possibly play that would beat your cards if you have the lead. You could lead with any card in your hand, and you would still take all of the tricks and the points. This happens rarely, and only towards the end of a round, so shooting typically requires a great deal of strategy in order to get to a point where it's safe for the shooter.
Make sure you have a strong hand
If other players know that you're trying to shoot the moon, they will attempt to stop you. The two easiest ways around this are to shoot only when you have a particularly strong hand and to play in a manner that does not indicate to your opponents that you are experiencing anything but a streak of bad luck. Leading early with high value cards is a sure way to tip off other players; try to make sure that other players have the lead until you're ready to act. Likewise, if you have been able to avoid taking any points in the game and suddenly begin to take them, other players may become suspicious.
Hold High Hearts
Shooting without holding the high cards in hearts is difficult, but not possible. The trick is convincing your opponents, ideally early on, to burden you with their penalty cards. Once any gaps in your hand are covered, you can begin to run through your cards and seize control. You can shoot the moon without any hearts or spades in your hand if you can grab the lead with an off-suit and never let it go, causing other players to run out of the suits that you have in your hand. This kind of technique is very solid, but if you have an excess of one particular suit, remember to draw out the higher value cards from other players before you attempt to take control, or you could end up with 25 points, rather than a negative 26.