This is the .htaccess code that tells the server where to find the documents.
Code:
# custom error documents
ErrorDocument 401 /401.shtml
ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml
You just create a standard html page with the message you want and name it per the naming structure in the .htaccess file. The error documents in this care are in the root with the .htaccess file. I am pretty sure that page you are referencing was done with cPanel utility. If you have cPanel, got to the error pages in the advanced features. It contains the templates you can use to make the error documents.
HTH