Would Pokemon be damaged by Spikes every time they rotate, or is it just every time you switch out?
No, it wouldn't work in a rotation battle. Toxic spikes/spikes only come into effect when the opponent switches Pokemon. This also goes for Stealth Rock.
Hope this helps =)