The term you want to research is search engine friendly URLs, most often accomplished with Apache's ModRewrite.
You will need to change your DB to also store the URL segment (e.g topic_title_2) so can find the page or article based on that, instead of the numeric ID.
It looks like all your current URLs use index.php?
An example .htaccess file (Apache configuration) might look like this:
RewriteRule category/([a-zA-Z0-9\\.\\_\\-]+)/?$ index.php?category=$1
RewriteRule topics/([a-zA-Z0-9\\.\\_\\-]+)/?$ index.php?topic=$1
With this a request for category/books will point to index.php?category=books (the address bar won't change, but index will have $_GET['category']).
You'll then need to lookup your DB for the correct content.
If you have a CMS for adding items to the DB it will need to create a unique URL segment for each record.