Water can exist in 3 common forms - as a solid (ice), as a liquid and as a gas (vapour).
In buildings, moisture can accumulate because of:
Occupant activity - breathing, sweating, cooking, disco dancing
Appliances - washing machines, dishwashers
Heating and Cooling - condensation from these units
Plumbing fixtures - showers, bathtubs, sinks
Humidity from outside (summer) via air leakage
Condensation on windows (winter and summer) because of temperature differences and humidity.
Wicking (capillary action) - when water moves from a high pressure to low pressure, it can actually climb upwards. This happens in masonry and wood buildings.
In all these cases, the level of moisture in a building needs to be carefully controlled.