You can change your status from Online to Away if you need to step away from your computer for a short period of time. This way your online contacts know not to send you any chat invitations while you are away.
To change your online status, select File, Status, and select one of the options (Busy, Be Right Back, Away, On The Phone, or Out to Lunch).
You can also choose to make yourself invisible to your online contacts by selecting the Appear Offline option.
You can access the same options by clicking on the downward arrow next to your name at the top of the contact list.