This is surrounding character thoughts in stories. I use to say: "Put character thoughts in italics to distinguish it from the rest of the text."
Now I say: "Italics? We don't need no stinkin' italics!"
It's weird, and it wasn't that long ago that I use to like character thoughts in italics, Now I find them annoying. To me, the italics are like waving a red flag to the reader, saying: "Look! See this right here? It's a thought!" And that's just lazy writing. If you're writing in a tight narrative, like 1st-person or limited 3rd-person, everything is already in the character's head, thus, it seems redundant to put it in italics. I've even found you can pull off nearly 1st-person thoughts in 3rd-person without reverting to italics. Allow me to demonstrate...
Tight 3rd-person narrative with 1st-person italicized thought:
She turned the octagon-shaped box in her hands. I wonder how it works.
Tight 3rd-person narrative with nearly 1st-person thought without italicizing:
She turned the octagon-shaped box in her hands. Wonder how it works.
See what I did there? I clipped the "I" from the beginning of the thought sentence, and it should be apparent that it's a thought sentence, otherwise, it doesn't work. And yeah, it switches tenses, but it's OK to do that, so long as it flows. When it flows, most of the time readers don't notice; it's only when they notice that cues them that something is off.
I'll post longer passages later on to further demonstrate this style.