It depends what you are paging. In case of articles split in pages, I'm sure, that they are split right in the DB where they are stored; with records like this: article_id, page_num, text. Then you need to parameteres for your paging script: id and num, to output a page of an article. Say, there are 12345 and 3. Then you make links to
<a href="id=12345&num=2">previous</a>
and
<a href="id=12345&num=2">next</a>
(isn't that easy? 🙂).
In case of paging some search results it's a little more complicated. Anyway, you've got to have two parameters similarly: query and page (optionally you may use per_page).
Then you write search function, that does search. For example, if you need to output paged records by their id number, it may look like this:
mysql_query("select from myTable order by id limit ".($page$per_page).", $per_page");
Generally speaking, you always need PageNumber parameter, and a function that outputs information depending on it. Everything else is up to you.