Why when we feel the cold weather, hundreds of small dots appear on the skin till we use to the weather temperature?

Goosebumps! These are goosebumps! Goosebumps are a normal, natural way that the body uses to keep itself warm when it is cold. Goosebumps are caused by the hairs in the skin standing up straight, which helps save heat! The muscles attached to the base of the hair contract just like other muscles contract to cause shivering in an attempt to generate heat.
Erector pili muscle. The small bumps are due to the contraction of the erector pili muscle connected to the hair follicle. These small muscles can contract due to internal stress or external factors such as cold temperature. As our body becomes used to this initial change, the muscle relaxes and the bumps are no longer visible.
Piloerection. This is the body's normal response to changes in temperature or emotion with the "hairs standing on end" or "goosebumps.".