Your question has several distinct issues. Let's look at each other in turn.
Sudden temperature changes
When materials are subjected to sudden changes in temperature, they can tolerate this change or be irreversibly damaged. It all depends on the materials used, the extreme temperatures and the speed of change. Take any lens heated to a temperature of 300 to 400 ° F and drop it in a bucket of ice water, it will likely crack. This does not mean that getting out of your house at a temperature of 0 ° C in winter will have the same effect. In fact, it will almost certainly not be the case.
Although 0 ° F is a bit extreme, switching from room temperature to zero zero does not seem to be permanently harmful to cameras and lenses. This affects the battery that powers the camera (more on this in a moment). When ideal optical performance is required in cold weather, for example for astrophotography, allowing all optical components to stabilize at room temperature before filming avoids minor and temporary optical problems due to cooling of different parts of the lens / camera. .
Moving from a warm environment to a cold environment is usually a lot easier on camera equipment, in terms of long-term health, than the other way around. The main responsible is the humidity.
Humidity and condensation
Condensation and moisture can damage your camera and your lenses in many ways.
- Moisture can affect electronic components, especially if a circuit is energized when it is wet. Allowing a voltage to be applied to a circuit board while it is wet is a recipe for a disaster. It will very often fry the electronics instantly.
- Condensation may leave mineral deposits on the optical surfaces when it dries. It can also "solder" dust to the lens elements or to the camera sensor and filter stack immediately in front of the sensor.
- If the humidity is combined with a warm and dark environment, mushrooms can grow inside the lens or the camera. Keep in mind that mushroom spores spread through the air and are all over. So is the dust. Even new lenses contain dust. These new lenses probably also contain fungal spores. It is a biological fact of life when it is present in the Earth's atmosphere.
The most common cause of condensation on cameras is moving a cold camera and / or lens in a hot, humid environment. If the temperature of the camera or lens is lower than the dew point of the ambient air, water droplets will condense on the colder surfaces. This should be avoided as much as possible.
The easiest way to avoid condensation is to always put the camera / lens in a sealed bag before moving it from a cold to a warm environment. The cold air contained in the bag will contain less moisture than the warm air inside the buildings. Leave the bag closed until the contents have warmed to room temperature. Any condensation that forms will do so on the outside of the bag.
Cold and batteries
Batteries are chemical devices that depend on chemical reactions to provide electricity. These chemical reactions are affected by temperature. When the batteries become very cold, their voltage drops quickly. A battery that will power your camera for hundreds of photos at room temperature will only handle a few dozen views in extremely cold weather. The good news is that just warming up the battery restores some of its energy. In cold weather, take a lot of spare batteries. Keep them warm in your clothes. Exchange your camera batteries and hot batteries often inside your clothes.
Related issues here at Photography.SE:
I accidentally refrigerated my lens for a month. Should I worry?
Camera in Arctic winter
What should I consider when using DSLRs in cold weather?
Inconsistent exposure with the same settings – why?
Special care for my Canon in the Alps
Is there any benefit to using a battery grip in cold weather?
What precautions should I take when taking a camera in wet conditions?
How to avoid condensation on a lens when you are outside?
How can I hasten the safe transition from air conditioning to the hot / humid outdoors?
Prevention of condensation on the lens when shooting in a cold place
How to dry the condensation of my camera?
What is the purpose of silica gel to protect SLR cameras from condensation of temperature changes?
What will happen to a camera if it is brought into an environment beyond its operating temperature?
In addition to several Pentax digital SLR cameras, which cameras are intended to operate at temperatures below 0 ° C (32 ° F)?
How is the cold resistance of basic DSLRs?
Is it safe to keep my camera in the hot car?
What precautions do I need to take to carry batteries / pull heat?
What to take into account when choosing a memory card? (Including the operating environment)