An entire book could be written on the topic, so we will only provide some quick wins here:
Get good website hosting!  If using WordPress, you want “Managed WordPress Hosting.”
Use a valid SSL certificate
Use a firewall to block spammy IP addresses
Enforce strong passwords
Ban users who consistently fail trying to log in using the wrong password or username.
Ban users who visit too many 404 pages
If you’re using WordPress, check out our awesome guide on WordPress Maintenance.
If you’re not well versed in website maintenance, hire a professional who can continually monitor, update, and maintain your site.