Technically, spiders are cold-blooded animals. A spider is ectothermic, which means it uses external sources like the sun to regulate its body temperature.
Although spiders are cold-blooded, they don't become cold like mammals. They simply reduce their activity and may change their location until they can warm up.
In the fall, spiders begin preparing themselves for winter. They produce proteins that allow their tissues to experience below freezing temperatures without the ice crystals forming on their cells.
Spiders that seemingly come in out of the cold are a particular species of spider that is adapted to living inside where the conditions are not always favorable for their existence. Indoor spiders face little food and water and constant climate that might not always be to their liking.