Most salt is precipitated from natural brine. Virtually all salt is “sea salt” including mined salt, the main difference is how much time has passed since it was precipitated from a sea of some sort. That brine contains small quantities of many metals and minerals that were in solution when the brine evaporated. Several heavy metals have significant solubility in naturally occurring brines so it isn’t surprising to find them there, but the quantity depends on the local geology and geochemistry. They won’t be evenly distributed even within a single formation due to different minerals having different thresholds for precipitation.
Natural salt is therefore not particularly pure. I believe it is typically on the order of 95-98% pure. The majority of contaminants are harmless things like potassium, magnesium, calcium, etc but there will also be traces of heavy metals, arsenic, etc.
Salt is literally one of the very cheapest bulk materials on Earth. Any non-trivial processing is going to be really expensive compared to the raw materials so people don’t do it unless they can’t avoid it (e.g. anti-caking agent for some food salt applications). As a consequence, I would expect most bulk food salt to have limited opportunity for industrial contamination.