where does the energy needed to heat up cold water come from?

What is the context?

The sun? A stove?