If you want to block an ip address from accessing your website you can use this code by editing the htaccess file.
Go to to the sitess root directory and edit the .htaccess file. You may need to change the option in your control panel to show all files including hidden files (only if needed). In most cases it will not be hidden
Select htaccess file and click on edit.
Copy this code in it anywhere below rewrite mod (or below all codes)
Eg: Deny from 000.000.000.000
Note: Replace the ip address to the specific ip address instead of 000.000.000.000
Save the htaccess file and you're done.