To stop chatting temporary – Under Chat, click the arrow next to Set status here. Select Sign out of chat.
After you sign out, your contacts won’t be able to see you online or IM you from within Gmail, and you won’t be able to see or contact them, either. If you use Google Talk and are signed in after signing out of chat in Gmail, your friends will still be able to see you online and chat with you through Google Talk.
To turn off chat permanently in Gmail: Click turn off chat along the bottom of any page. You will be signed out of chat, and your Chat list will be minimized. To turn chat back on, just click turn on chat.