example.com/page-namethe request is rewritten (that's rewritten not redirected) to
/page-generator.php?name=page-namewhich looks up which record number that page name matches (sends 404 header and error message if no match) and then fetches the content from the database, assembles the page and sends it out.
/1-page-nameor similar), making it easier to fetch the content, and to allow the page name to be changed without changing the ID. Before the content is fetched, the php script does a look up to ensure the requested page name is correct for the requested page number. If they don't match, it sends a redirect to the correct URL.