When you do the sql query to get the records from the DB, use the LIMIT function that allows you to control how many records are returned. The links 1,2,3,4 etc pass in those variables to control the number of records that are returned.
LIMIT $offset, $per_page
$offset is where to begin and $per_page is how many records to show...