Depending on the domain registrar you used, you should be able to pay for up to ten years in advance (Namecheap is an example of a host that will allow bulk payment, and this is what I will be using to keep my website up, as well). Some (?) registrars will also allow auto-renewal, but you would then have to make sure you have enough funds in your account, so that they can be automatically removed for automatic renewal.
Hosting is a different matter, and somewhat more difficult. The hosting service I am using now, for example, allows not only for bulk payment (paying years in advance), but also for automatic payment, similar to automatic renewal of the domain, where it will allow you to simply add as much money as you wish to your 'account balance', which will then automatically get removed for continued payment of hosting, without you having to manually take action. I am not sure, however, how other web hosts handle this, as it will presumably differ from host to host.