In order to understand and know your poker odds, you must calculate the outs. The outs are the cards that will improve your hand and make it a winning one. If you have a hand of 3, 4, 5, 6 and you think the other player has two Aces; you need the river card to be a 2 or a 7 so you can make a straight. So 2s and 7s are your outs.
You have two cards in your hand that are Queen of Hearts + 9 of Hearts and on the table, there are Ace of Hearts + King of Hearts + any two cards. If the opponent starts to place big bets, there is a huge chance he has a pair of Kings or even a pair of Aces. You will not worry about him having a flush because you will have the highest Flush with the Queen. In order to win that hand, you need one more heart cards as the river so you can create your flush.
Every card deck contains 13 cards of the same suit: if you count out the cards, you have (2) and the cards on the table (2), which means there are 9 hearts left in the deck. Thus, you have 9 outs.
Now it is time to turn these outs into numerical odds so you can make a decision. Since there are fifty-two cards in the deck and you have 2 cards in your hand and there are four on the table, that leaves 46 cards (we ignore what the other player is holding).
That means that you have 9 cards out of 46 possible cards that could make a flush and win, while there are 37 cards that can make you lose. The odds for you getting a winning card on the river are 37:9. This can be simplified to 4 to 1. Therefore, you are 4 times more likely to lose the hand than win it.
Now that we know your odds of winning are 4:1, the next decision is whether to call the bet or not. It depends on the amount of money in the pot. This does not mean you should go for it if the pot is big, but you should look at the ratio of the money you will win compared to the bet you are going to call. So if the opponent raised $10, making the pot equal $100, you have the chance to bet $10 on 4:1 odds to win $100. You should take the bet and call it because 4:1 odds means you will win $40 for $10, but you are getting the win at 10:1. You should call it in a heartbeat.