This is the one of the arts of poker, you have a good hand but betting from you opponent is saying he has a better one.
This is no simple hard and fast rule to say when you must give up a good hand, you need to understand factors like how likely it is he has you beat and how likely he he is to be be bluffing, both require finesse.
With your draws study pot odds and the (calculated) expectation of making the hand you are drawing to.
This again is not a thing you can learn in 5 minutes, but it is not a difficult thing to study and learn either, the is plenty of information about it on the internet and here at CardsChat in the 30 Day (FREE!!) course..