How to set up tricks, and how to know when to switch from setting up to taking is beyond the scope of this guide. This just points out some general conventions and guidelines.
2nd hand low
When your RHO leads, and you can't win the trick, it is rarely correct to play anything other than a low card
3rd hand high
When you partner leads and you can play a higher card than what has already been played, it is rarely correct for you to not play a high card in the suit.
Don't Lead Unsupported High Cards
It is almost never correct to lead a high card when you don't have the one right below it, and there are higher ones still out there. e,g, if you K53 of a suit, and the A hasn't been played, don't lead the K!
Defense
Sequence conventions
When leading from a sequence (e.g. QJT), lead the top of the sequence (e.g. the Q). When playing from a sequence, when you haven't led, play the bottom of the sequence (e.g. the T) Exception - HSBC leads K when holding the AK.
When following low to a suit
Give count. With an odd number of cards remaining play your lowest. With an even number play something higher. (note - sometimes it is correct to not do this, if your second lowest card is too high. Use your judgement. 2nd note - this is the HSBC convention, other players do things differently)
Lead through strength
If dummy is to your left, it is typically better to lead suits dummy has high cards in, than suits dummy only has low cards in. (i.e. you are trying to finesse dummy, not your partner).
Lead up to weakness
If dummy is to your right, it is typically better to lead suits dummy doesn't have high cards in. (i.e. you are trying to finesse declarer, not your partner).
Lead partner's suit
Unless you have a good reason to do otherwise lead partner's suit. (suit they've indicated via the bidding, or by their previous lead). It used to be said that the only reason to not lead partner's suit was if you were void in it, and even that wasn't a great reason. While the truth isn't this extreme, this is an important rule.
Don't lead opponent's suit
When in doubt, lead your best suit. (partially because that tells partner what to lead when they get in).
Don't change suits without a reason. When defense keeps switching what suit they lead, this almost always helps out declarer.
NT specific
Opening lead
Lead your side's suit, not the opponent's suits. I.e. you want to shy away from leading a suit the opps have bid, and you really want to lead a suit your partner has bid. (See rule above about leading partner's suit).
Outside of that, lead your longest suit.
Once you've picked your suit:
If you have a 3+ card sequence lead the top of the sequence. (e.g. Q from QJT53)
If you have 4+ cards in the suit, lead 4th best.
If you have 3 cards, lead 3rd best
If you have only 2, lead your highest.
Exception to above (only in NT), if you are leading from a 3 or 4 card suit where your highest card is the 9 or lower, lead your highest card, not your lowest.
Trump specific
Rule #1 - Don't underlead an ace! Doing so risks the wrath of the bridge gods, who may commit you to an eternity of hands where your finesses always fail and the trump always split 5-0. (doesn't apply if you are leading the trump suit)
Rule #2 - Don't lead an ace.
Just don't lead a suit where you have the Ace and not the King. If you feel you must break one of the above rules - break rule 2.
Lead partner's suit. (but try not to break the above rules).
Usually don't lead the opponent's (non-trump) suits.
If you have a suit with AK, lead the K. This is will often be your best opening lead, because you get to maintain control, and get to see dummy before your next action.
When to lead trump on defense is beyond the scope of this guide. Don't be afraid to do it, if you think you have a good reason to do so.
Declarer
When the opening lead is made, make a plan. Even if dummy has a singleton in the suit led, don't call for it until you've made a plan. Making a plan up front, makes it easier to count the suits you need to count, and to make the right play. In general, after making this plan, follow through with it, unless something unexpected happens. i.e. think more up front, so you can save time later.
No Trump
Count your winners. Do you have enough to make your contract? If not, how can you promote extra winners?
The general strategy in NT is to try and set up a long suit, so that the opponents run out and your small cards in the suit are good. Unless you are worried that the opponents can take too many tricks right away, set up your long suits before winning tricks.
Try to not play your stoppers in the opponents suit. For example if you have
A53 opposite 72
in the suit the opponents lead, you almost always want to duck the first 2 rounds of the suit and not win your ace until the 3rd round. This allows one of the opponents to potentially also run out of the suit, and therefore not be able to lead it if they get in.
Trump
Count your losers. (usually from the perspective of the hand with the longer trump). If you have too many losers, think of ways to get rid of losers. There are two main ways:
Set up a long suit - just like in NT.
Trump losers in the hand that is shorter in trump. (trumping in the hand that is long doesn't usually gain you tricks, since those trump were going to win anyway. It can be useful transportation, sometimes)
If you don't need your trump for something else, DRAW TRUMP! Don't carelessly win a couple side aces first. It'd be a real shame if that ace you were counting on got trumped.
Obviously, don't draw trump (or at least too many), if you are planning on trumping losers. How many trump you are going to draw right away should be part of your initial plan you make before playing to the first trick.