In a two way race, you need 270 electoral votes to prevail. The final tally could be 270 to 268.
270
268
---
538
In a three way race, you need 181 electoral votes to prevail.
It could look something like this.
181 Perot
180 Bush
177 Clinton
---
538
As an example: 1860 there were 4 major candidates for President. The victor still needed to obtain a majority of EVs that year or it went to the Congress to decide. Lincoln got just under 40% of the vote, but he still won outright because he got 180 EVs - which was just over 59% of the total amount of EVs.
Sen. Douglas came in 2nd place in total votes, just under 30%, but it was nearly worthless, because he received only 12(!) EVs, carrying just Missouri and New Jersey (and in NJ’s case, of the 7 Electors, 4 voted for Lincoln and 3 for Douglas).
VP Breckinridge was in 3rd place with just 18%, but he got 72 EVs (or nearly 1/4th of the college), which all came from the South (and DE & MD)
Even Sen. John Bell, who placed 4th with 13%, still got 3rd place in EVs, 39, well ahead of Douglas, but won just 3 states (KY, TN & VA).
Even with all that dissension, the Republican majority in Congress still would’ve seated Lincoln if he came in under the number of EVs needed (if they had gone to Douglas instead).