Folding may not be the best move generally, but it can be the best move in certain situations. Being able to control emotion and fold a mediocre hand can also be difficult as well. in order to be able to asses each of your play objectively, there are several things you need to understand first.
Folding is definitely NOT something you need to avoid at all times. It is a powerful weapon that can help you manage risks and apply the right poker strategy. When you are up against strong opponents betting around $20 with pot sized only at $30, and you have nothing but a mediocre pair, simply consider if the risk is worth taking; if not, don’t hesitate to fold right away and observe the game as it progress.
There are also situations when you need to fold even after you put so much money into the pot. This is the most difficult situation to face when it comes to folding. Your mind, and gut feeling, will refuse to fold because a lot of money will be lost. You need to practice to control those emotions and stick to the most objective solution: fold when you really have to.
Last but certainly not least, you can always choose fold at the very beginning of a new round, or pre-flop as we call it. There is no need to play every single starting hand; pick your hand carefully and choose to fold if you think the hand is not potential or strong enough to win the round.