I like to keep it simple, suits me.
Board contains :
: jh ah
You hold qh
Pot contains 2000
Your opponent goes allin for another 1000 and you suspect he has AK, should you call?
The pot is offering you odds of 3:1 ie. you need to invest 1000 to win the 3000 in the pot.
So you need to work out the odds of hitting your flush.
The easiest way to do this is counting your outs ie. 9 outs because there are 9 remaining hearts in the deck.
Then perform a simple calcualtion, outs x 2 x cards to come, in this case (9 x 2) x 2 = 36% therefore you are roughly 2:1 to hit your hand so a call is a good proposition over the long term. Even though you win only once in every three times, each time you win you are winning 4 times what you have to put in, so its a good gamble.