In order to be the Sole Survivor, the castaway must be not be removed from the game (either by being voted out, disqualified, voluntarily quitting or by forced evacuation by the moderators) - unless a twist returns them (e.g. Redemption Island) - until the Final Tribal Council (usually done during Day 39). Then, the castaway must get the most Jury votes among the finalists that also reached the Final Tribal Council, which usually consists of 2-3 castaways.
In the event a winner has been found to have cheated to earn their victory, they may be retroactively be stripped of the title, in which at the discretion of the hosts, the season will either hold no winner or the runner-up will be promoted to Sole Survivor.