Okay, first things first: You need a domain or subdomain. This does not work with a free website, sorry.
1) Make a new file in your cPanel, name it “404.shtml”. You can’t have it in a folder or anything, it must stay in your main directory. [ Mine is “/home/CPANELUSER/public_html/404.shtml”]
2) Once you’ve made your page, go ahead and copy this code onto that page. (You can edit this later, but this is just basic)
3) It will then look like this. Without the textbox at the bottom of course.
4) When someone reaches a broken link to your site or reaches a part of your site that doesn’t exist yet, they will get your 404error page.