Heavy metals are essential for life. However, an extreme amount is detrimental, creating stressed conditions and becoming toxic to the point of eventual system failure and death of fish and invertebrates.
Fortunately it is relatively easy to determine if your water has these possibly harmful elements by using a test kit (such as Seachem's copper or iron kits) to make sure your aquarium maintains correct levels.
Iron has to be at fairly high levels to affect fish health. Even at low levels it can cause algae to flourish. Some iron should be present in all planted tanks as it is required for growth, but levels should be monitored to prevent an overdose. Iron can also come from your tap water, especially if your water comes from a well, and can also be present in homes with galvanized pipes.
Copper can be found in all water in trace amounts. A small amount can come from copper pipes in your home. If you have a marine tank, it would be prudent to test tap water before adding inverts as they are extremely sensitive to even low levels. Copper is often used in fish medications (for external parasites) and algaecides. It can be absorbed into porous materials such as gravel and released later. Keep in mind that if an aquarium is ever treated with copper, decorations, gravel or other porous objects should never be used with invertebrates.
Iron can be removed by mechanical filtration (if the iron is precipitated), carbon, specially equipped water softeners, and ion resins. If you use an RO unit, you will not have to worry about iron or copper coming in from your tap water, since the unit will filter it out before it ever hits the aquarium. Some water conditioners can detoxify heavy metals allowing them to precipitate so they can be removed by your filtration. Carbon filters and polyfilters along with good mechanical filtration can be used directly in your aquarium filter to remove copper and iron. Polyfilters indicate what they are removing by changing color (blue=copper, orange=iron, green=ammonia). When exhausted they turn to a dark gray, letting you know just when they need to be changed.
Regularly measuring the levels of these heavy metals will ensure that you maintain these minerals and their by-products at a safe level.