To win the Electoral College and become president, a candidate must win a majority of the electoral votes. That means snagging at least 270 out of the 538 votes. As a candidate works to reach that magic number, he or she keeps two things in mind. First, most states have a “winner takes all” policy. The candidate who gets the most popular votes in a state gets all of that state’s electors. (Two states—Nebraska and Maine—are exceptions. There, the electors can be divided up among multiple candidates.)
Second, some states have a history of voting for a particular party. For example, if a state’s voters have voted Democrat in all recent presidential elections, the Democratic candidate might consider that state safe—and the Republican candidate might decide not to waste much time campaigning there. Candidates of both main parties focus their energy on swing states—states where either main candidate stands a good chance of winning. A candidate typically needs to win at least a few swing states to get 270 electoral votes.