A 404 Error Page is the page that the visitor lands on if the URL they type in or the link they click on leads to a page that does not exist on your site.

Joomla comes with an error.php file in the Protostar template by default. You must rename the htaccess.txt file to .htaccess for the site to redirect to this error.php file.

The default error.php file does not use your template styling, but it will pick up some elements from your site, like the main menu.

You can edit this file to look more like a page on your site and include links to appropriate pages on your site so that the visitor is not frustrated by the ugly 404 Error page.

You can also place code in this error.php file so that all erroneous links go back to your main index page.

There are certain SEO considerations with the use 404 Error Page. Be sure to use it wisely. If you have old web pages that have been renamed or taken down from your site, you should consider using .htaccess Redirects or using the Joomla Administrator Components ->Redirect to send users to the new pages rather than having them land on the Error Page. This is a better experience for the visitor and for SEO.

Visit the joom3 page: How can I create a custom 404 error page for my Joomla 3 web site?