In the modern US political system the main system that political parties use to nominate candidates are primary elections, however, caucus' are also used in certain states. In a primary the vote is cast by a secret ballot in order to decide the candidate of the party. In a caucus members of the party meet in an open meeting and discuss who they will select to be the party candidate for that state.
President Andrew Jackson used the spoils system to replace existing government officials with his own friends or campaign supporters. Jackson is reported as saying, "...to the victor goes the spoils...", in reference to this.