The next seven melachos involve the hides that were used in the coverings of the Mishkan. The first step in getting these hides was trapping the animal. This is the melacha of tzod.
Tzod is an unusual melacha in that it is highly subjective. Closing the door to a room containing a loose bird might be considered trapping it, but it closing the same door when the room contains a spider would not. A horse in a corral is not considered trapped (at least at the Biblical level), but a horse in a stall is.
Trapping is only relevant to wild or untamed animals. A dog or cat that has been domesticated is considered already trapped through its submission to its owner. Therefore, one may close the door on a room containing a pet or put a leash on one’s dog, since there’s no concept of trapping and already-trapped animal. The same applies to domesticated barnyard animals on a farm.
The Biblical prohibition on trapping applies to animals that a person would trap because he wanted them, like deer. While the Sages extended the prohibition to include animals not normally hunted, they did not include potentially harmful creatures in the stringency. Accordingly, a person may cover wasps or bees with a cup on Shabbos if he fears being stung. (It goes without saying that one may confine an animal that is truly life-threatening.)
This is just an introduction to the concepts of the melacha of tzod; it is not a substitute for a full study of the halachos.