Prevention is always better than cure. Hackers typically go for easy targets. Make sure your website is not one of them by taking the following steps...
1) Don't go for cheap, highly contended hosting. Your website may be compromised by other badly maintained websites that share the space.
2) Always keep your CMS secure. Make sure it is patched with the latest releases.
3) Secure private pages and admin access through IP protection where possible.
4) Change your passwords regularly and make sure they are strong.
5) Use HTTPS. Certificates needn't be expensive anymore. They should be installed as standard.