You should read about explicit and implicit odds
. Its the way you should play in this cases.
I dont want to give you right now a lot of information about it but, so as to get you started:
If you know you need the flush to win the hand just call bets of aprox 1/4 of the pot.
2 People in the hand. Pot is 100$
The other bets 25$
So you have to pay 25$ for a 125$ Pot. That means that you get in risk 1 $ to win 5 $.
The probability of getting the flush is more or less 4,1/1 underdog
Now if your pot odds
5/1 is bigger than the probability 4,1/1. The call is justified. If not fold.
Because you will lose 4,1 times for a total of 102.5 $
You will win 1 time for a total of 125 $
That is a profit of 22.5 $ every 5.1 hands that you play this way.
This is a simplification of the way you should think, it is much more complicated, you should check some books about this topic.
PD1: Sorry if you dont understand anything, english is not my native language. Im also a newby player, so correct me if needed
PD2: You should have posted this in Learning poker section.