Often, in on-line play people will make a bet if they have either an open-ended straight draw or a flush draw. The reason for this play ties into the concept of 'expected value.' Of course, there is a large chance that you will not actually catch the flush or straight, but if you do it will increase the payout at the end and be profitable over the course of several hands.
Here's my example
[This is example is oversimplied and excludes other hand possibilities including someone else catching a full house, or other hand possibilities.]
You have J 9 as hole cards.
Flop is 10 8 3 (rainbow).
This gives you an open ended straight draw (8-J) whiche means that you have 8 outs to catch the draw (either a seven or a queen), which means that you have a 32% chance of hitting the straight.
If the pot is already 450 chips, and you bet 150 chips--two other players call.
[Note there are other hand possiblities like simply pairing the jack on turn or river or everyone folding to your raise--depending on the other players cards, etc.]
You know have a pot of 750 chips with a 32% chance of winning the pot (approx). =240
On the other hand, you have a 68% chance of losing the 150 chip bet= 102.
Overall, your expected return is 240-102= 138 which means that this is a profitable bet in the long run. Clearly, in any given hand you are more unlikely to miss the staright, but over the course of playing several hands, this type of bet will likely be profitable given the risk/reward ratio.