They can go pretty long with proper maintenance. Cleaning and relubing your chain every 600-1000 miles usually does the trick. Even if you don't clean it each and every time, getting some lubrication to the links every 1k miles or so can extend the life of your chain quite a bit.
There are a lot of other factors that can increase/decrease chain life (salty air/water, lack of use [sitting around], heavy use, etc), but for normal day-to-day riding it's good to try and keep the chain clean and oiled/lubed up. ATF, gear oil, WD40, chain lube - whatever you use, be sure to use it regularly and it should help your chain last quite a while.