The answer to this question depends on the definition of a "pilot."
You can get a private pilot's license as a civilian in about 6 months to a year depending on your study habits and financial status. To go on and get the commerical and instrument ratings takes 250 hours of flying and more money. This will completely depend on how you structure the mission. If the money is set aside and you fly and study straight thru, you could do it in another year.
To get an Airline Transport Rating, you need a minimum of 1200 hours of flying. (Most people do this by working as an instructor or flying cargo or pipeline patrol etc.) Another way is to get on with the commuter carriers or with a corporate flight dept. and build your experience.
Another avenue is to go into the military for flight training. The "commitment" for this training is generally 8-10 years of active duty.
Most pilots who are hired by the airlines have all the required ratings, approximately 2500 flying hours and are between the age of 25 and 30 years old. (There are exceptions to this, but it is a pretty good average.) Another way of saying this is that it will take almost 8-10 years to gain the required experience.
I hope this helps anwer your question,