What is the Spoils System?

My understanding of this is when a certain political party wins an election, they give jobs to folk who supported them in said election. ‘To the victor, goes the spoils’