Margins are the white space between the edge of a page and the live elements, which are the text and illustrations. Authors must consider margins as carefully as trim size because they very much affect the presentation and feel of a book. They should not be too wide or too narrow remembering that non-fiction invariably has wider margins allowing a reader to make notes. As with the trim size, a sensible starting point is to look at a range of books in your intended genre because you should not stray far from what has evolved as the ideal structure.
Most publishers and all POD services set a minimum width for their margins, which varies according to the trim size and the number of pages. Every page requires margins except where there are images that ‘bleed’.
The gutter refers to the blank space running from top to bottom of the inside of each page adjacent to the binding. Irrespective of the minimum gutter width set by the printer it must not be too narrow otherwise some of the live element will be very difficult to read as it literally disappears into the gutter. The required gutter size increases with the thickness of a book (ie the number of pages) because more of the live element is lost in the binding. Createspace require a minimum gutter of 0.5” (12.7 mm) for a book of 151 to 300 pages.
The outside margin refers to the page edges opposite the gutter and the edges at the top and bottom of the page. These margins prevent live elements entering the trim area and being at least partly lost when the pages are trimmed. CreateSpace requires a minimum outer margin of 0.25” (6.35 mm) but recommends a margin of not less than 0.5” (12.7 mm).
When setting the top and bottom margins you must consider running headers/footers and page numbering and allow sufficient space between those elements and the outer margin and with the live elements of the page. As suggested elsewhere it is important than live elements are not squeezed into an unnecessarily small part of the page.