Assuming you are talking about the Irish General Elections that are coming up (seeing your account states you are Irish) That works as follows:
The 160 members of Dáil Éireann will be elected by single transferable vote (STV) from 39 constituencies, each returning between three and five TDs (Dáil deputies). Voters complete a paper ballot, numbering candidates 1, 2, 3, etc. for 1st, 2nd, 3rd, etc. preference. Ballots are sent to the constituency count centre after polls close and are counted the following morning over several rounds. In STV, each ballot is initially credited to its first-preference candidate but may be transferred on later counts to the next available preference where the first preference candidate is elected or eliminated.
You should fill the entire list if you want to reduce a candidate's chance of winning as much as possible. The preferential ballot system is there to streamline the process of a multi stage election seeing that in this system it is possible for candidates to be eliminated before reaching the final nullifying all votes cast on the eliminated candidate.
Your preference list will matter seeing as your vote will go to next person in line if your candidate gets eliminated due to a lack of overall votes. This can repeat itself until no candidate you prefer is left leaving less opposition for the one you do not like increasing their chances of obtaining a spot. This way you ensure that your vote will not get tossed aside (and in effect reduce the % of votes your least favorite candidate gets).
A practical example would be the French election of 2017, in this election there were several parties in the first round with only the two largest going to the final round. In the first round Macron had 24.01% and Le Pen 21.30% meaning that as the two largest parties they would go to the final nullifying the other 54.69% of the votes. During the second election Macron got a total of 66.10% of the votes while 33.90% of the votes went to Le Pen.
Now in the second round people instead chose their "lesser evil", this caused a lot of people who dislike or don't agree with Macron to vote for him over Le Pen due to them disliking her even more. If they had chosen not to vote (out of protest) Le Pen could have become the winner (although the huge difference in the results would have made that unlikely).
The difference between this Irish election and that French election is efficiency, the French election was split up in two events while the Irish one is done in a single go (saving money and time in the progress). This ensures that you as the voter will never have an invalid vote, and although it might not be your preferred outcome it will reduce the chances of your "greater evil" obtaining a seat.