To spoil something is to damage it or to make it unusable. Spoiling a cake will make it dry and tasteless. Spoiling a project will make it difficult or impossible to finish.
The water was so cold that it started spoiling the food right away.
The wind was so strong that it was spoiling the leaves on the trees.