A story within a story, also referred to as an embedded narrative, is a literary device in which a character within a story becomes the narrator of a second story. Multiple layers of stories within stories are sometimes called nested stories. A play may have a brief play within it, such as in Shakespeare's play Hamlet; a film may show the characters watching a short film; or a novel may contain a short story within the novel. A story within a story can be used in all types of narration including poems, and songs.
In the Bible, Jacob has a dream about a ladder to heaven. Having a character have a dream is a common way to add an inner story within a larger story. (Painting by William Blake, 1805)
Cervantes finds the manuscript with the further adventures of Don Quixote. Illustration by Ricardo Balaca for the 1880 edition.
In Western art history, mise en abyme is the technique of placing a copy of an image within itself, often in a way that suggests an infinitely recurring sequence. In film theory and literary theory, it refers to the story within a story technique.
Las Meninas by Velázquez, used by Gide to demonstrate the technique of mise en abyme
Southwestern entrance mosaic of Hagia Sophia, Constantinople, depicting both Hagia Sophia itself and Constantinople, both offered to Jesus and the Virgin Mary