The design and concept phase
Just as how a writer works from an outline or mind map, or an artist works from a rough sketch, nearly all games start from some sort of a rough concept or design document.
A design document's purpose is to describe nearly everything about a game. In the case of an RPG, it would describe how the player moves around the game world, how the player interacts with enemies and NPCs, how combat works, and more. The design document becomes the basis upon which all the game code is built.
Concept
Usually, a game starts with a very rough concept.
For example, let's consider the RPG we'll be making in this book. I might have the idea that this game would be a linear turn-based RPG adventure. It's a very rough concept, but that's OK—while it may not be a terribly original concept, it's enough to begin fleshing out and creating a design document from.
Design
The design document for the game is based on the previous rough concept. Its purpose is to elaborate on the rough concept and describe how it works. For example, while the rough concept was linear turn-based RPG adventure, the design document's job is to take that further and describe how the player moves around the world, how the turn-based combat works, combat stats, game over conditions, how the player advances the plot, and a lot more.
You should be able to give your design document to any person and the document should give them a good idea of what your game will be like and how it works. This, in fact, is one of the big strengths of a design document—it's incredibly useful, for example, as a way of ensuring that everyone on a team is on the same page so to speak.