This has been mentioned before many places, but it still stands to be repeated. If you’re shooting outside during the cold months (I’ll mention summer in down lower) the lens on your camera does get cold too. So when you come into a warm room or building that cold lens will cause condensation to form on it. The temperature difference between indoors and outdoors doesn’t need to be too great.
As an example I was at an Autumn Festival this past weekend, the temperature outdoors was probably in the low 50s. Then I went into an auditorium that was still cool, probably in the mid 60s, but with many people and the resultant high humidity. And I didn’t take my own advise to take time for the lens to warm up. The result, no way to see anything through the lens for at least 5 minutes.
I should have kept the lens cap on the camera to avoid having water actually condense on the front of the lens, but I just waited for everything to warm up. At a time like this you should not attempt to change lenses, opening the camera body will let the warm damp air condense on the rear lens element, the mirror, and possibly the sensor though the sensor would be partly protected by the shutter.
I mentioned Summer a bit higher in this post. The same applies to shooting in the summer, but the direction would be the other way around. When you take your camera from an Air Conditioned building, or car into the humid outsides air you’ll have similar condensation.
Give your lens plenty of time to warm up before you take the lens cap off. Or put the entire camera into a bag and wait. Those of you who wear glass glasses (plastic reading glasses are not as prone to this problem) have probably experienced very similar condensation on your glasses, instant fog when going from cold to warm.