occurs when the audience knows something that a character does not.

This is known as dramatic irony. It creates tension and suspense in a story, as the audience watches the character make decisions based on incomplete information.