Writing a story within a story is one of the most common literary techniques, and used so often you may fail to notice every time it's happening. Character dreams and remembrances can be a story within a story, though in the most traditional sense when this device is used you'll be following two different plots. Either way, it's a risky writing move. When it's done well, it can be great. When it's done poorly, readers end up hating both stories.
A Tale of Two Stories
If you read novels regularly, the story-within-a-story scenario is pretty much unavoidable. It's going to crop up in the form of diary entries, newspaper articles, perhaps a book the character is reading. To name just a few of the authors who have used this technique, I present Chaucer, J.R.R. Tolkien , Edgar Allen Poe, J.K. Rowling and Herman Melville.
At times, the story-within-a-story technique is done remarkably well. Fried Green Tomatoes has two separate plots that unfold together, though one takes place many years before the other. Each story is interesting and engaging, and each has characters that are worth reading about.
But I've also seen it done very badly indeed, and I'm not going to name any specific examples. I have noticed certain elements at play where the story-within-a-story is concerned, however, and many of the same elements are always in play when I absolutely hate it.
- Suddenly, from nowhere: If the reader gets past the middle of the book and suddenly a very long story-within-a-story appears, this is annoying. It unexpectedly interrupts the flow of the main story, and this is where the focus ought to be as the reader nears the conclusion of the story. If you must insert an extra story here, keep it brief.
- Weirdly unrelated: If the story-within-a-story has pretty much nothing whatsoever to do with the main plot, I'm going to be spending the entire time wondering why the heck I'm wasting my time. Chances are good that I'll simply put down the book.
- Brand-new style: It becomes off-putting if the story-within-the-story is told in a very different voice with language that reads differently than the rest of the book. The story may be told by another narrator and I get that, but it still takes away from the overall cohesiveness of the book. Remember that every novel should read as a whole, and that includes all the stories within the story.
If you're telling a story within a story, make sure that story has an important purpose. Otherwise, you're wasting the reader's time...and they'll end up hating all your stories.