Short answer
Most Vikings got iron from local sources. In much of Scandinavia, the main supply was bog iron ore, dug from wet ground and lake bottoms, along with some rock ores. It was smelted in small furnaces to make iron lumps that smiths then forged. Some iron and finished goods also moved through trade.
Bog iron ore
Bog ore forms where iron dissolved in groundwater collects in wet soil, leaving nodules or crusts. It is not rich, but it is widespread and easy to dig with simple tools, so it suited small communities. Lake ore, found in lake beds in parts of Sweden and Finland, was also used. Because bog ore can slowly form again, some places were revisited, though how much this mattered is something specialists discuss.
Other sources
Not all iron came from bogs. Some regions had rock ores that were mined, and parts of Sweden, with its long mining history, were important in later centuries. In general, Viking Age iron production was a local, seasonal and often farm-based craft rather than the work of large mines. Iron also traveled through trade and as finished items such as blades, tools and fittings, but the details vary by place and period.
Smelting in a bloomery
Bog ore was usually roasted, then smelted with charcoal in a clay-lined furnace, often a short shaft furnace. Bellows pushed air in to raise the heat. The iron did not melt completely. Instead it formed a bloom, a spongy mass mixed with slag, which was pulled out and hammered to remove impurities. The waste slag was left behind, and heaps of it are a major clue for archaeologists. This is the same basic method described in our history of iron mining.
Smithing and recycling
Smiths forged the cleaned iron into nails, rivets, axes, knives, sickles and weapons. Iron was valuable enough that broken items were often reworked. Quality varied, and the best-known swords are often tied to skilled smiths and carefully chosen iron and steel, though this is a specialized topic.
What archaeology shows
Furnace pits, slag, charcoal and tools tell the story. Radiocarbon dating of charcoal from furnaces helps date production, and scientific study of slag can suggest the ore used. Sites in Norway, Sweden and Denmark show that iron production could be organized at a fairly large scale in some regions. Earlier Iron Age communities elsewhere worked iron similarly, as seen in did the Celts start the Iron Age.