@heroma,
You may have problem with the localhost setup which does not support permalinks.
Most localhost provide an option to enable Permalink Support.
For e.g. if you are using Apache then Go to Apache -> Apache Modules -> Enable the “rewrite module” option.
Another reason for it could be the change in .htaccess file.
– Take a backup of this file and delete it from the wordpress folder. Now add the default file by going to Settings -> Permalinks -> Save changes. Your .htaccess file will be automatically created.
– Also make sure that WordPress has enough permission to write or edit your .htaccess file.
– If default code does not work, try different code that is compatible to your setup.
Also try the following tricks..
– Clear browser cache or open your site into a different browser or altogether in a different system.
– Try using a different theme.
– Deactivate unnecessary plugins.
– If you are working on live site then compare the URL for the site and WordPress URL, if not same this might create an issue.
– If you are using custom post type, then check that each post has unique slug name and title.