How to protect WordPress from hacking?


I'm pretty much a beginner with WordPress, but I've been coding sites for years.
Once I made a small WordPress site and it was hacked in a matter of days, content completely eliminated. Now I want to prevent this from happening.

What can I do?

What I first did when installing WordPress was to changed the "wp" folder into some strange name. As I know, hackers often go for the "wp" name.

What others tips could you give me?