When someone spoils something, they ruin it or make it bad. Spoils are also the things that are taken from someone after a war or a fight.
If someone spoils something, it is usually bad because they make it not good. If someone takes spoils, it is usually good for them because they get something they want.
Examples:
She spoils the surprise by telling everyone.
The spoils of war were taken by the victorious army.
He spoils the game by cheating.
The spoiled milk smells bad.
The spoils of the treasure hunt were gold and jewels.
He spoils the fun by being mean.