Free indirect speech
When stories are told in the third person, they are usually told in the third-person omniscient or third-person limited point-of-view. In the latter variety we see that the narrator shows us the thoughts and actions of one character, usually the main character. Sometimes the narrator will state these thoughts explicitly. For example: "Madam Bovary thought to herself, "how nice it would be to have son!" She considered...