Tarantulas have two retractable claws on the ends of each of their legs; these are used to grip surfaces while climbing. The pressure applied to the tarsus (or foot) while walking or crawling causes the foot to split in two and allows the claws to fan out. Surrounding the claws, the tarantulas also have a dense group of hairs (called the scopula) which aid the tarantula in gripping smoother surfaces such as glass. You can see the scopula here.
(via little-audrey)