There are 4 basic steps you should follow in the case your WP website is hacked.

First, you should install a security plugin, for example, WP security. You should also re-install the latest WordPress version, change your passwords and user-ids for all users, and check if all of your plugins and themes are up to date.