First of all,you have to find a host that supports .htaccess. Paid hosts are most likely to have this feature enabled, but the only free hosts that support it as far as I'm concerned, are: Portland, Fragism. The host must give you access to FTP as well, because if you upload the .htaccess file by browser, it's not very likely to work. Portland and Fragism give you FTP access, so they're nice free hosts if you want to create custom 404 pages. You DON'T need to have your own domain to do that.
Now,you have to create you error page. It is just a simple HTML document.It should contain a small message -"we apologize for the inconvenience" and other advanced stuff don't seem to keep visitors on your site. Trust me, I've tried and lost them everytime. Quickly give them a sitemap or suggest that they search your site. You should always enable visitors to search through your site anyway.
On to Part 2: Uploading the files and common errors
This article has two parts
PART 1: Checking and creating
PART 2: Uploading the files and common errors