The Chicago Transit Authority runs a 24 hour train service - the "L" Blue Line - between downtown Chicago and O'Hare Airport.
Blue Line stations downtown include La Salle, Jackson, Monroe, Washington and Clark/Lake. The Orange Line to/from Midway Airport connects with the Blue Line at Clark/Lake station.
The O'Hare CTA station is located on the lower level concourse in the main terminal area. Follow the signs for 'CTA Trains' or 'Trains to City'. Passengers for Terminal 5 should use the ATS transfer train to/from Terminal 5.
Journey time between O'Hare Airport and downtown Chicago is around 40 minutes. Trains run every ten minutes during the day, more frequently during rush hours.
The one-way CTA fare is $2.25.
More information is available at the Chicago Transit Authority web site.
The Metra North Central service train station is located near long term parking Lot F. Metra operates trains to several regional destinations.
Metra train information is available here.