Let us begin at the beginning.
Well, actually, let us begin somewhere in the middle.
When the designer has the text and the art for a book (or just the text, if there will be no important art presence), she goes into her fancy design software and lays out the text and the illustration together in approximately the way it will appear in the book.
I say "approximately" because she isn't going to spend a bunch of time finessing the details--this is just the cast-off (or prelim layouts). In a longer book, she won't do more than a few pages.
Then she'll show this to the editor, so that they can make some decisions together: what typeface will suit the book's mood and function best? How are the illustrations or chapter heads going to be treated? Do they like this little ornament on the page edge, or would this one be better? etc. Different book, different questions.
Authors and illustrators often won't see a cast-off, and in some books' cases, a cast-off doesn't happen. In those cases, the designer goes straight to galleys.