Overview
Nesting behavior refers to an instinct in animals during reproduction to prepare a place with optimal conditions for offspring. The nesting place provides protection against predators and competitors that mean to exploit or kill offspring. It also provides protection against the physical environment.
Nest building is important in family structure and is therefore influenced by different mating behaviours and social settings. It is found in a variety of animals such as birds, fish, mammals, amphibians, and reptiles.
In mammals
Female dogs may show signs of nesting behaviour about one week before they are due that include pacing and building a nest with items from around the house such as blankets, clothing, and stuffed animals. (They also sometimes do this in cases of false pregnancy, or pseudocyesis). Domestic cats often make nests by bringing straw, cloth scraps, and other soft materials to a selected nook or box; they particularly are attracted to haylofts as nest sites. Commercial whelping and queening boxes are available however, children's wading pools (dogs) and plastic dishpans (cats) work just as well. In birds it is known as "going broody", and is characterized by the insistence to stay on the nest as much as possible, and by cessation of laying new eggs. Marsupials do not exhibit a nesting instinct per se, because the mother's pouch fulfills the function of housing the newborns. Nest building is performed in order to provide sufficient shelter and comfort to the arriving offspring. Threats, such as predators, that decrease the chance of survival will increase care of offspring.
Pigs
Under natural conditions, sows will leave the herd and travel up to 6.5 km a day prior to parturition in order to find the appropriate spot for a nest. The sows will use their forelimbs and snouts in order to create excavated depressions within the ground and to gather/transport nesting materials. Although the nests vary in radius dependent on the age of the sow, the nests are generally a round to oval shape and are usually located near trees, uprooted stumps or logs. The shelter provided by the nest built in sows is of utmost importance to thermoregulation. For the first two weeks of the piglets life their physiological thermoregulation is still developing, and due to a lack of amount of brown fat tissue, piglets require an increased surrounding temperature.
From Wikipedia (CC BY-SA 4.0).