It is impossible to hide the back button. It is part of the browser UI and you do not control that.
There are various ugly hacks which attempt to make it unusable, most of which will result in your users wanting to punch you in the face, and likely switching to a less annoying competitor site.
What you should do is:
- Generally, make your website back-button-tolerant. Most web pages are informational and can safely be cached, and the user may forget something and want to go back and look at a previous page.
- Make sure any transactional stuff (i.e. requests that actually do something) happen via HTTP POST, so at least, if the user revisits one of those pages, they get the 'this will resubmit, are you sure' warning. Bonus points for having things execute in a POST which does its stuff and then uses a 303 redirect to a GET page so the history works nicely and the user can't accidentally resubmit stuff.
- If there are pages which you really don't want users to go back to, then set them to not be cacheable, and in the page, check whether the application is in a valid state to show that page. But there should not be many of these. In anything less important than, say, an online bank (and I really hope someone writing one of those isn't asking this level of question), there should really be none.