The tank, I guess you would call it a 'storage tank', is where the heated water is stored, and the burner is under it, tank is incased in steel, perhaps ceramic lined, gas, oil, or elec. Ours here is 50 gallons, the one in Maine perhaps 30, its electric. Insulation inside the outside cover.
But when a tankless heater is used, the water is heated by electricity going thru coils in close contact with them, thus there is no storage. They can also be called "on demand" heaters.
Im not good at the terminology here, I just know how the doggone things work and really good at knowing how they fail. And how they manage to do so when you just need that hot shower!
As to the iron, magnesium, and other sediment that gets into well water,,,,,some can be filtered out. The acidity of the water also can determine how much of this, and other compounds and chemicals are dissolved, and the temperature also effects this.
Corrosion is a problem around here due to these factors.
Relatively pure spring water is the best.
Jane