However, for the most part you should not show these cards to other players, even when folding.
Be very careful to not expose your hole cards to other players as you peek at them. You're allowed to use both of your hands to look at your cards (although you're not allowed to take your cards off the edge of the table) and should do so to help keep them shielded from prying eyes. Always memorize your cards when you look at them, including the suit — this will keep you from having to refer to them again when something like a flush or straight draw hits the board (if you do, it'll be obvious that you're looking to see if you hit your straight or flush draw).
When you're dealt your hole cards, it's not a bad idea to wait and not look at either of them until it's your turn to act. This way you can watch other players around the table as they glimpse at their cards for possible hints as to what they may have. This strategy also keeps you from being obvious about whether you're going to bet or fold well before it's your turn to act.
If you do decide to wait to look at your hole cards, nearly every player at the table will be looking at you as you glimpse your cards. Have your best Poker face ready. (If you don't have the ability to generate a good Poker face, sneak a peek at each of your cards, one at a time as they are dealt.)