I've done this before, modeled on the administer content page, but here Dmitri has written up a tutorial!
A pager basically splits a result set over multiple pages. It achieves it using a LIMIT clause, with an offset (page one is LIMIT 0, 10, page two is LIMIT 11, 20, etc).
There are three steps to create a custom pager.