First understand some of the most likely causes of a WordPress hack. It’s also always better to prevent a hack than to recover from one. Look at the post: Most Common WordPress Plugin Vulnerabilities
One of the better recesses pages for recovering from a WordPress hack comes from WordPress themselves. FAQ My site was hacked
But far and away the best blog post is How to Clean a Hacked WordPress Website or Blog.