Usually in advance via web or phone. I was able to get mine the same day over the phone, since I was just going by myself and could fit in even one open spot. The 1st two tours of the day were already packed. They highly recommend getting tickets in advance, especially for groups.
Ryan is spot on. Get your tickets on the website.
Thanks! Your answer is awaiting moderation.