Writing a character's thoughts. What is the rules for when writing the thoughts of a character? First-person narratives are easy to depict but what about third-person?

I seen it stated that a character's thoughts are to be written in italics or still be in quotation marks but state it is a thought. I heard of both.

I'm a little confuse about it.