A spoiler candidate takes votes away from a major candidate who offers a similar political ideology. This means that the chances of success of the opposing major candidate are better as the splitting of the vote has a spoiler effect for the initial party in question.
Voters often feel inclined to vote for an independent candidate or a minor party as their first choice. This means that the vote gets split between candidates with the same political views, offering the opposition a better chance at winning the elections. Some of the ways parties use for reducing the spoiler effect include proportional representation and approval voting.