Driving directions have been available online from several sources for quite some time but public transit directions have been a little harder to come by. There are some websites, such as Hopstop, that offer help with public transit, but they generally cover only one or a few cities.
Google is now entering the fold with Google Transit. The site uses Google Maps to display information on how to get where you are going via public transportation. It includes such information as schedules, approximate travel time, and walking time. It even calculates the fare and tells you how that fare stacks up against the cost of driving. All this is currently available for Portland, Oregon only, but Google plans to add additional areas soon.