A server will return a 404 response code if a page cannot be found. This typically happens if the website owner has removed a page or changed the permalink/URL of the page. It also happens when another website links to a page using the wrong URL.
It is common for website owners to create a custom page for 404 errors. Most website templates come packaged with one. If yours doesn't, you should create one yourself, however you may want to consider creating something unique if your existing 404 page is a little bland.
The primary purpose of every 404 page is to advise the visitor that they have landed on an unreachable page. However, you don't need to do this in a boring way. Landing on a 404 page means a visitor did not find the page they were looking for, however if you make your 404 error page both useful and entertaining, they might browse your website instead of hitting the back button.
To give you inspiration on what you could do with your own 404 error page, check out the list of creative 404 error pages below.