If you "wash out" in the first 2 years, you are discharged and can go on with your life.
If you "wash out" after the first day of classes your Jr year, you are then commited to the AF and will have to serve some enlisted time (1 year for each semester/partial semester completed). At the end of the enlistment, you then have the opportunity to re-enlist or you can accept a discharge.
If you graduate, you receive your commission and have to serve 5 years on active duty. If you go to pilot training upon graduation, you have to serve 10 years upon completion of pilot training (it takes approx one year to complete pilot training).
The above is the current policy. As with every gov't agency, there is exception to policy! However, because of the amt of $$ spent in educating the cadets, exception to policy is pretty rare!
And I agree with the PP who said, you just never know. Your friend may find his niche at USAFA, then go ont to be a future Joint Chief of Staff!