The water pipes are covered with cotton during extremely cold weather because air is trapped in the fine pores of the cotton.
The heat is insulated by the cotton and the air.
They do not transfer heat from the inside of the pipes to the outside air.
As a result, cotton keeps the water in the pipes from freezing.