URL segments and the page reference field
How to set up pagination
Basic guide to using the processwire $pages variable