The 270 refers to electoral college votes a candidate needs to win the presidency. There are 538 electors across the United States -- 435 representatives, 100 senators, and 3 electors from the District of Columbia ("Decoding the Electoral College," Gale Virtual Reference Library).
Remember: every state gets 2 senators and then the number of representatives is decided based on the population in the state. This is why California (55) and Texas (34) both have more electors than Alaska (3) ("Electoral College, Gale Virtual Reference Library).
When we go to the polls to vote, there are two things happening: we vote for a candidate and add our vote to the popular vote. Our vote is also added up and candidates win electoral votes based on the majority of popular votes for a candidate in each state. Most often, candidates will win both the popular vote and electoral vote. However, this year, while Hillary Clinton lost, she did win the popular vote.
The American Presidency Project is a website (see below) that is both a non-profit and non-partisan platform to showcase documentation and results from presidential elections. It is interesting to see the shift over time and how the United States' overall political leanings change. What states seem to stay the same color year after year? Which ones go back and forth between blue and red?