Pilots are officers. You first need to become a commissioned officer through ROTC in college, the Academy, or Officer Candidate School (Army and Marines have this for enlisted soldiers to become officers; I'm not sure about the Air Force). ROTC is the easiest way to a commission. If you have good grades and test scores, you can get them to pay for college while you train to become an officer. When you graduate and get your 4-year degree (another requirement to be an officer), you also get your commission.
All of that is the easy part. The hard part is that almost everyone else wants to be a pilot, too, so they test the hell out of you. I failed the depth perception vision test; they said I would fly the plane into a mountain or something. It's not like I walk into walls or anything, but the tests are strict. The majority of people who want to fly never get the chance. You have to first be satisfied with being an Air Force Officer, and just take your chances that you can make it through the strict selection process to become a pilot.