Either type Ctrl+d on your keyboard, or click the down-arrow in the upper-right corner of the Messenger window to open the Main menu and click Sign Out.
OK, open Yahoo! Messenger again. In the sign-in dialog, enter the different Yahoo! ID and password. You can automate the password-typing part of the process going forward by checking the box next to “remember my password”. This saves the password associated with that ID and helps you speed up the sign-in. It also illuminates a further option: “sign in automatically”. If you’d like to automatically open Yahoo! Messenger with this ID from now on, check this box.