This document explains how to do this.
Edit: Here's the key instructions copied from that location:
I have a couple different Gmail addresses that I use for different
purposes. Historically, Google Accounts – including Gmail accounts —
have only let people access one account at a time per browser, so
using both accounts has been a bit inconvenient. I’ve either had to
sign out and sign back in, use a second browser for my second account,
or use a Chrome incognito window. And I'm not alone; lots of people
have asked us for a better way to use multiple accounts at once in the
same browser.
Now, you can visit google.com/accounts and click the link next to
"Multiple sign-in." After you sign into your first account, you can
sign in with up to two additional accounts from the new accounts menu
in the upper right hand corner of Gmail, then easily toggle back and
forth between them. You can even open multiple Gmail tabs — one for
each of your accounts.
Please keep in mind that this is a feature for advanced users, and
there are a couple things to watch out for:
Not all Google services support multiple account sign-in yet. For
the services that don't support it (like Blogger and Picasa Web
Albums), you'll be defaulted to the first account you signed in with
during that browser session. So if you click a link from Gmail to
Blogger, for example, you'll be logged into Blogger with the first
account you signed in with, even if you clicked the link to Blogger
from your second Gmail account.
We’re still working on making Gmail and Calendar work offline with
multiple sign-in. If you rely on offline access, you probably don't
want to enable this feature quite yet.
Multiple account sign-in only works on desktop browsers for now, so
if you use Gmail on your phone's browser you won't see this option
yet.
Since Google Apps customers can already sign in to their accounts at
the same time as their personal Google Accounts, we won’t be adding
this new feature to Google Apps until the new infrastructure is in
place.
If you use more than one Google Account, we hope this makes you more
efficient. If you have any questions, check out our help center.