A Standard deployment of OCS with a single Access Edge server will provide that functionailty.
Start with this thread for infomartion on purchasing license of Public IM (MSN, AOL, Yahoo):
http://forums.microsoft.com/unifiedcommunications/ShowPost.aspx?PostID=2644243&SiteID=57
And start reading the deployment documentation here:
http://technet.microsoft.com/en-us/library/bb880155.aspx
http://office.microsoft.com/en-us/communicationsserver/FX101729111033.aspx