In your admin panel go to Options > Permalinks
Then under Common Options select "Custom, specify below", now, in the form field enter "/%postname%" (NO QUOTES)
Under "Optional", there are two fields, enter "/topic" (NO QUOTES) for "Category base" and "/tag" (NO QUOTES) for "Tag base".
Then click "Update permalink structure".
Now there is a piece of code at the bottom of the page and you have to copy and paste it into a file and name the file .htaccess and save it and upload it into your website, where Wordpress is installed.
Also please note that, not all the hosting packages will support this. Your website needs to be hosted on an Apache web server with mod_rewrite enabled.
I hope this makes sense