Description taken from Wikpedia.
The trapdoor is difficult to see when it is closed because the plant and soil materials effectively camouflage it. The trapdoor is hinged on one side with silk. The spiders, which are usually nocturnal, typically wait for prey while holding onto the underside of the door with the claws on their tarsi. Prey is captured when insects, other arthropods, or small vertebrates venture too close to the half-open trapdoor at night. The spider detects the prey by vibrations and when it comes close enough, the spider leaps out of its burrow and captures it.
A hungry individual will wait halfway outside of its burrow for a meal. Male trapdoor spiders can overcome the females' aggressive reactions to their approach, but it is not known how. Females never travel far from their burrows, especially if they have an eggsac. During this time, the female will capture food and regurgitate it to feed her spiderlings. Enemies of the trapdoor spider include certain pompilid (spider) wasps, which seek out the burrows and manage to gain entrance. They sting the owner and lay their eggs (usually one per spider) on its body. When the egg hatches, the larva devours the spider alive.
Unlike other mygalomorph spiders, the Ctenizidae have a rastellum on the chelicera. Resembling "teeth" or "barbs" on each fang, this modification is used to dig and gather soil while constructing a burrow. They use their pedipalps and first legs to hold the trapdoor closed when disturbed.There are about 120 described species of trapdoor spiders