Thor's Hammer (Mjölnir) is a symbol of protection and blessings. It was a common symbol ofeveryday people, worn by people of all levels of society. Thor is the people's god. He is the big, friendly, and powerful protector of the gods, and so by extension is considered the protector of man. The Hammer was used to protect and bless the community and ward off evil spirits. It was also a focal point for oaths, so if someone was going to promise or swear "by the gods" or "by Thor", they could swear on the Hammer, similar to how Christians might swear on the Christian Bible.
Mjolnir means "the grinder". It is so named because it is powerful to grind down mountains or smite even the most powerful enemy with one blow. It was a gift to Thor from the dwarves, the best craftsmen in all of the realms. Anything that was mystical, magical or of exquisite quality was said to be made by dwarves. Two dwarven brothers created the hammer as part of a competition with a rival dwarven house. Loki was doing his best to prevent them from even creating it, because he wanted the other house to win, but in the end their creation ended up being the amazing "grinder", despite all of Loki's attempts to prevent its creation.
During the years when the Viking religion was overlapping with Christianity, it was worn in a similar way as the cross -- it may have been co-opted as a cross-symbol surrogate for people who were culturally both Viking and Christian, especially since the two shapes have a similar form. It may also have come into fashion in reaction to and in defiance of the crosses that were becoming popularly worn by Christians. It became a symbol of both common religion and common culture to those who wore it.
Artist's Note: A friend wanted a Thor's Hammer design on a beer mug, so I sat down and worked out this knot that same day. It is my take on some of the ancient pendants found at archeological sites. In my version, I've created the entire design in a single line knot pattern also known as an eternity knot. It turned out so good I could not resist making a pendant out of it. Check it out the video below!