Medieval writers often structured a narrative by telling a story within a story.
A story within a story is a literary device in which one character within a narrative narrates. A story within a story can be employed in all types of narration: novels, short stories, plays, television programs, films, poems, songs, and philosophical essays. It was a very common device utilized in medieval times.