You can get Applecare at time of purchase (its an option available on the att website and should be on apples website also).
Or you can go to an Applestore / online and pick up the boxed product. It should be like any other apple product, where you'll recieve a peice of paper in a box with a code on it. You take the code, go online and enter it onto the apple service support website along with your serial number, then your service is extended for another year. I would get it if you rely on your phone in anyway (like its your only line or you need to be available for work etc). I like the iphones overall reliability, but problems do arise. I had my first gen phone replaced the day after I brought it in because the vibration no longer functioned (and got a refurbished but brand new looking phone), and I also got a replacement cable on the spot because I was having issues. Applecare will be quicker and you won't have to worry about out of pocket costs to be reimbursed later.
Cost is 69 bucks.