This is very easy to do using htaccess and can be useful if there is a spammer or disgruntled member attacking your site (something which unfortunately happens a lot to forum and blog owners).
To ban someone completely all you need to do is add the following code to your .htaccess file.
Simply replace the ip address below with the ip of the person you want to ban
#ban users from visiting the site order allow,deny deny from 188.8.131.52 allow from all
If you want to ban more people you simply add more lines, like this :
#ban users from visiting the site order allow,deny deny from 184.108.40.206 deny from 9220.127.116.11 deny from 18.104.22.1686 allow from all