You use a plugin that allows you to do that. As far as I know there isn't a standalone ban plugin but SimpleAdmin lets you do it (along with a ton of other stuff that you might not want).