This seems impossible today, how was it possible then?
A few factors led Nixon to winning by such a landslide, some due to his own policy and some due to the failures of the Democratic Party.
First let's discuss his opponent and the democratic party in general. McGovern made a critical mistake early on by naming Eagleton his running mate. It quickly came to light that Eagleton suffered from depression and had undergone electroshock therapy, which in 1972 gave voters a lot of anxiety. McGovern declared he "stood 1000% behind Eagleton" shortly before dropping him from the ticket, which left the voters feeling McGovern had gotten his very first decision wrong. Additionally, McGovern was seen as a far left candidate supporting ideas like Guaranteed Minimum Income. Being too far left during the Cold War was not a strong move.
Furthermore, the Democrats were split over the Vietnam War. Johnson had ramped up the war effort significantly during his term ("LBJ, LBJ, how many kids have you killed today?") and many democrats did not support such a move. Nixon, just before the 1972 election, announced that a deal had been reached with the North Vietnamese and "peace was at hand." Voters who supported ending the war had a choice between McGovern, who wanted to end the war, and Nixon, who was ending the war.
Not only was Nixon succeeding with the Vietnam War, he was also succeeding with China and the USSR. He reestablished trade with China in 1972, a country which had not had any relationship at all with the USA since it had become communist 25 years prior. He also entered the USA into the Strategetic Arms Limitations Treaty with the USSR, also in 1972. He was (probably correctly) viewed as a master statesman and well versed in the art (he also cooled tensions with the USSR in the 1958 kitchen debates with Kruschev.) It helps that Nixon was also presiding over a booming economy, leading voters to believe he was strong in both foreign and domestic policy.
Additionally Nixon had Sprio Agnew for his VP. Agnew was insanely popular. He was a fiery man who was unafraid of aiming burning hot rhetoric at anyone who criticized him, especially "liberal elites" and the media. If someone hit Agnew, he struck back twice as hard. Conservatives loved it, and a not insignificant part of Nixon's base might be described as Agnew's base.
Edit: upon rereading the paragraph below, I'd like to emphasize that it is unlikely Nixon actively participated in the Southern Strategy. He was likely aware of it and accepted its benefits, but the conversion of the South from blue to red is a post on its own that stretches from FDR to Reagan. The South is best said to have been lost by the Democrats, rather than won by the Republicans.
At this point, I must mention the Southern Strategy. It's generally accepted that Nixon masterfully employed the Southern Strategy to win the South from the democrats through appealing to southern whites with dog whistles and by supporting policies that would hurt blacks. It's a little more nuanced than that though. It might be easier to say that Johnson lost the south, rather than say Nixon won it. LBJ is reported to have declared that democrats lost the south "for a generation" as he signed the Civil Rights Act. A bill which Nixon supported, along with the Voting Rights Act; he also supported early versions of Affirmative Action. Regardless of how you view it, Nixon swept every southern state in 1972 (a feat previously unachieved by Republicans). He did, however, run a hard stance on The War on Drugs and Law and Order, two hallmarks of the Southern strategy.
A combination of a weak democratic candidate in McGovern on top of general floundering by the party, roaring success with foreign policy, a booming economy, failure of the democrats to keep the South, and Agnew led to Nixon sweeping the country. There's no other way to put it, he smacked McGovern so hard the democrats have fearing straying too far left ever since.
As for Massachusetts, you can almost always count on the state to vote Democrat.
Follow up question: what made Massachusetts the only state not to vote for him?