What module does this site use to handle its great badge system? Is this a functionality that exists within the existing badge module, or is it anything else?
This site (stackexchange.com) is not built with Drupal, but if you're looking for similar features in Drupal, check out User Badges, possibly in combination with Userpoints and/or Rules.