Blocking someone means they can't message you, and can't see when you're online.
To block someone, right click on their name on your friends list - or if you've got a chat window open with them click on 'actions'. From the menu click on 'Block' or 'Block Contact' (as below).
To unblock them right click on their name again and go to 'UnBlock'.