You'll often be asking this question if you're drawing to a straight or a flush. So you'll need to calculate if you're getting good enough odds to call a bet or raise on the flop or turn. First, you need to calculate how often you'll hit your draw - by first counting your outs.
If you're drawing to a flush, you have two suited cards in your hand and two on the board, that means 9 cards of that suit left in the deck. On the flop, it's 9*4 (+4) = roughly 40% of hitting. Meanwhile, on the turn (so the odds of hitting on the river) is 9*2 (=2) = roughly 20% of hitting.
With pot odds, think of the number of cards again. 52 in the deck, two in your hand and three on the board (flop). That means 47 unseen cards (including your opponents' hole cards). Nine cards can save you but 38 cards don't complete your draw. So that's a 38:9 ratio - or 4:1 (or 25%). So if you're not getting 4:1 / 25% pot odds, you shouldn't call. This ratio changes again when you consider implied odds.