There's actually two different "train" systems in Vancouver. The Canada Line (which goes from downtown Vancouver to Richmond and YVR) and the SkyTrain (which goes from downtown Vancouver into the outer suburbs of Metro Vancouver and into the Lower Mainland). I don't want you trying to find a SkyTrain at YVR when there will only be signs for the Canada Line.
The ride on the Canada Line from the Port to YVR (end to end) is about 30 minutes according to Translink (the company that runs transit service in Vancouver) once you get going. However, there may be a bit of a wait (anywhere from 5-20 minutes) depending on when you arrive. For an idea of the schedule, the website is
http://tripplanning.translink.bc.ca/hiwire?.a=iScheduleLookupSearch&LineName=999&LineAbbr=999
(Scroll down to the Canada Line). I usually give myself 45-60 minutes when heading to the airport from downtown (but I'm almost always early!).
To understand cost, it's helpful to understand that the bus/SkyTrain/CanadaLine systems are divided into zones. Vancouver is one zone, Richmond (where YVR is located) is another zone. So to travel from Vancouver to Richmond, one pays for a two zone ticket.
As for cost:
From Waterfront (Canada Place) to YVR (two zones)
- Weekdays from start of service to 6:30 p.m. it would be $3.75 for adults and $2.50 for children (4 and under are free).
- Weekdays after 6:30 p.m. and all day Saturday, Sunday and Holidays it would be $2.50 for adults and $1.75
From YVR to Waterfront (two zones)
- Take the above fares and add $5 to them.
- Note: Daypasses ($9) are exempt from this YVR Add-on Fare, so if you're going to do some sightseeing the same day, it may be worth it to just get a DayPass. FareSaver tickets (a booklet of individual prepaid tickets bought at a discount) are also exempt. If you're going to be sightseeing in Vancouver and utilizing the bus/Skytrain/CanadaLine systems a lot, it may be worth while to purchase this instead. What you can do is buy the tickets for one zone (all of Vancouver) and then "upgrade" to a two zone ticket at YVR (that gets you around the $5 add-on).
Hope that helps - I know it can be confusing!