In most states there is a game of chance. It's also possible that the electors for that state simply aren't counted and it goes to the House. Or if one party controls all of the state government, the state legislature could try to unilaterally assign the electors to their candidate and it goes to SCOTUS (3 justices were implicitly OK with that during Bush v. Gore).
A state could require a majority for election of the electors.
In the past, state laws provided that the legislature would make the determination. This happened in 1852 in Massachusetts and 1860 in Georgia.
A state could provide for an alternative such as a runoff.
In Missouri, electors are chosen by congressional district based on the statewide popular vote. Statute provides that in case of a tie, the legislature chooses the elector for each district. Since there woul