You can buy an AP online through Disney's webpage. There are no discounts available anywhere on them. They will send you a voucher, but you don't even need that to get a room booked at the AP rate. Just tell them. They will check that you have an AP upon check-in. So you at least need the voucher by check-in. I'm pretty certain that you an exchange the voucher at the two Disney stores at the airport. They will be dated the day you do it though (so your year begins then) so if you are going to another Orlando property first, and not going to WDW right away, it might be better to wait until you actually are on Disney property. You cannot exchange the vouchers , or buy AP's at the hotels.
Once you have the voucher though you can go to the AP part of the Disney webpage. You can also sign up for DDE (It costs, I think $60, but gives you 20% off at many disney sitdown restaurants. Also, an AP will give you free parking at WDW. Even without DDE, the AP gives some discounts off food (Often 10% at lunch) and some discounts off water parks, Disneyquest, the WOD store, and some others I never really used.
Also, I think it takes about six weeks to get the actual DDE card. I signed up last year when they had just opened it up to AP users, so maybe it won't take as long toorder it now. They will email you prrof of purchase ahead of time though, so if the real card down't arrive in time you can use the letter, but the card is obiously nicer.
The biggest perk of an AP though is the room discounts. But disney seems to be slowly reduceing the discount,and also delaying the release of the discount codes.