Custom error pages can be created from your cPanel->Advanced->Error Pages.

Click on the page you would like to edit and enter the new content, which can either be plain text or HTML code. Once you are satisfied with the new page, click on the Save button below the editing field.

To enable the usage of the new page, enter the following line in the .htaccess file of the directory for which you would like to enable the custom error message:

ErrorDocument <number> /~<cpanel_username>/<number>.shtml

Where <number> is the number of the error message for which you have created a custom page and <cpanel_username> is your cPanel username.