The first thing you want to do when evaluating a draw in NLHE is figure out how many outs you have and what frequency you will improve at. Let's take a look.
Let's say you open with Ts9s from the CO to $3 in a $0.50/$1.00 game and the BB calls. The flop comes AK2 with two spades, and the BB leads out for half pot. Let's ignore the pecularity of the BB donking this flop, which surely favours the preflop raiser, and focus on our draw. In this situation our ten and nine are not worthless but not worth much either. Should, villain could be bluffing, and we could hit a pair, and have the best hand, and not fold it, but that is quite the parlay. On the other hand, we have nine spades, which are probably good. Still, one of our spades pairs the board, and we are drawing to a non nut flush, so could hit and lose.
Since our opponent bet half the pot, we are getting 3:1. We know 5 cards, so there are 47 remaining. Of those, we like 9 and dislike 38. 9 x 4 is 36, so we are slightly worse than 4:1 against improving on the turn.
One very important factor when deciding to call on the come is how close your pot odds are to your ratio of outs to non outs. Here we are getting 3:1 and our odds of improving at 4.2:1 against. That's not great, but it's not bad either. If BB bet 3 bb on the flop, then we only have to make another 1.2 bb on the turn and river the times we hit to break even. This is ignoring the chance that we make our hand and lose, which is a rare occurance but still a factor, but we can expect to make a decent amount of money the times that we make our hand. Or, conversely, if they check and fold to any scare card, so that we cannot get paid on implied odds, we can abuse them in other ways, by bluffing any texture changing card.
A factor we haven't discussed yet is stack sizes. Stack sizes are important when determining whether you should draw, since the more your opponent has the more you can thoeretically win. In general, the deeper your opponent, the more liberally you can draw, especially on the flop. You can draw more liberally on the flop because you have more streets to get paid off on, and also your opponent might give you a free card on the turn so you get two streets for the price of one.
Another crucial factor is your opponent and their play style. If your opponent is loose and hates to fold, then there is more value in drawing against them than against a tight player. How your opponents view you also matters. If you have a wild image and have shown some bluffs, then you can draw more liberally than someone who is viewed as a "nit" who always has it.
You must also take into account if the pot is multiway and you are not closing the action. If there is a player behind you who can still raise, then your effective outs are actually less than your direct pot odds, because of the chance the third player raises and you forfeit your call.