Spoil can mean to ruin or damage something, or to treat someone too kindly and make them spoiled.
When we spoil something, like a relationship by being unfair or a gift by not taking care of it, that usually means we messed things up. But when we say "spoil the fun" or "spoil a surprise", it's more about making an experience less enjoyable than expected.
How common is "spoil"?
Word spoil is considered uncommon in modern English. It has a balanced usage among all categories: speech, fiction, newspapers and academic texts.
Definitions
verb
(transitive, archaic) To strip (someone who has been killed or defeated) of arms or armour.
(transitive, archaic) To strip or deprive (someone) of possessions; to rob, despoil.
(ambitransitive, archaic) To plunder, pillage (a city, country etc.).
(transitive, obsolete) To carry off (goods) by force; to steal.
(transitive) To ruin; to damage in such a way as to make undesirable or unusable.
Example: All this sun spoils me for vacations in the far North.
(transitive) To ruin the character of, by overindulgence; to coddle or pamper to excess.
(intransitive, of food or drink) To go bad; to become sour or rancid; to decay.
Example: Make sure you put the milk back in the fridge; otherwise it will spoil.
(transitive) To render (a ballot) invalid by deliberately defacing.
(transitive) To prematurely reveal major events or the ending of (a story etc.); to ruin (a surprise) by exposing ahead of time as a spoiler.
(aviation) To reduce the lift generated by an airplane or wing by deflecting air upwards, usually with a spoiler.