Generally speaking, your goal in a round of Hearts is to take the fewest points. However, if you manage to take all 26 points in a round, this is called "shooting the moon," and you get to subtract 26 points from your total instead.
Although difficult to do and generally not recommended for beginners, here are some tips on how to shoot the moon in Hearts.
Consider the Possibility of Failure
If you try to shoot the moon and miss by a single heart, you will instead gain 25 points. If you're at 75 points or more, then this will end the game with you in the last place. Be sure you can afford to fail -- or be sure that you are good enough not to.
Check Your Hand
You don't just need some high cards to shoot the moon; you need most of them. You'll also generally want a long suit in which you hold at least six cards, including most (if not all) of the royalty. Every hole in your hand, every missing ace, is a trick someone else could take to ruin your plan.
If you are trying to shoot the moon, you can't afford to have any cards in hand that will force you to lose a trick with points in it. If you have a suit with only low cards in it, get rid of those cards. Passing low cards may make it obvious to your recipient that you are trying to shoot the moon, so be aware of this fact.
Also, keep in mind that some players will hold on to a high card, rather than passing it, precisely to prevent other players from shooting the moon. If the player passing to you is likely to do this, it will make shooting the moon much harder.
If you are missing some important cards (especially aces), and you pass away all your low cards, you may end up with a 25 point hand if the player next to you holds an ace.
Pay Attention to the "Holes" in Your Hand Once the Round Starts
If you have the K, Q, J, 8, 7, or 3 of diamonds, look to see when someone plays the ace. Once they do, you hold the three highest diamonds and can likely go on a run later in the game if you get the lead.
But until the ace of diamonds falls, you don't hold the highest card, and someone else can stop your run. Until that ace falls, you may not want to tip your hand and make your moonshot attempt too blatant. Otherwise, that annoying missing ace may come back to take one heart at the wrong time and ruin your plans.
Once the Cards That Can Stop You Have Been Played, Take Control
A popular method is to use your high cards to take tricks repeatedly, and then play your long suit starting with the highest card to run the table. By the time you hit the lower cards in your long suit, everyone else should be void, so you should win the tricks even with a three.
Be Sure You Have Some High Hearts
Once hearts are broken, you may want to be able to lead A, K, Q of hearts, in order to take three rounds of hearts from other players. It's okay to have a single low card like a five of clubs lingering in your hand at the end of your run, so long as you have already taken all the hearts.
What you want to avoid is the scenario where you run the table, but on the final trick, you play a five of clubs, your neighbor plays the jack of clubs she was saving, and someone else drops a heart to give her a point -- and ruin your moonshot.
If you can clear out all the hearts early on, all you have to worry about is the queen of spades. Once you get all of that, it doesn't matter if you have a few cards stuck in your hand that will lose your tricks, because you have all the points.
Above All, Remember Shooting the Moon Is a Rare Occurrence
If you aren't sure if you should take the risk with your hand, it's probably safer not to try.