Every time you tweet out a link to your website or make a Facebook post that has your URL you are inviting people to hack into your website. On average I get 5 to 10 WordPress attacks on my sites when I tweet out a link. If you are using WordPress and you are not securing your website you will get hacked. This is the plugin that I use on all my sites WP All In One Security.
In this video I will explain step by step including installing the plugin. The plugin also makes automatic backups of your site with just a few clicks.
What Should I do If My Website Is Hacked
Like this article says the first thing is not to panic. Take a deep breath and allow yourself to get mad for 30 seconds and get over it. Being mad doesn't help with rational thinking. Take a look at How to clean a hacked wordpress website as it will give you some good ideas on how to approach it.