Why water composition matters at all
Brewing tea is extraction, and what dissolves out of the leaf depends partly on what is already dissolved in the water. Water with a moderate mineral content extracts more of some compounds and less of others than very soft or very hard water does. This is why the same tea can taste noticeably different in two cities, and why traditional accounts of tea regions often mention the local spring water.
The practical version
Very hard water flattens tea, dulling aroma and often leaving a film on the surface of the cup. Very soft or distilled water tends to give a thin, hollow result, because there is nothing for the extraction to work with. Moderately soft filtered tap water is the practical sweet spot for most people in most places. If your tap water is heavily chlorinated, a simple carbon filter jug removes the chlorine taste and costs very little; that is usually the single biggest available improvement.
Freshly drawn, and not re-boiled
Water holds dissolved gases, and boiling drives them off. Water that has been boiled, cooled and boiled again is measurably flatter, and the difference is perceptible in delicate teas. Draw fresh water each time and boil it once. This is a small effect and an easy one to capture.
What is not worth doing
Buying bottled mineral water specifically for tea rarely justifies its cost or its packaging, and the mineral content varies enough between brands that the result is unpredictable. Distilled or reverse-osmosis water makes tea worse rather than purer. Elaborate remineralisation recipes exist and belong to a small enthusiast niche; nobody needs them to make good tea. Filtered tap water, freshly drawn, at the right temperature, covers almost every case.
The film on the surface, and why it is not dirt
Leave a cup of black tea standing and a thin skin forms on it, catching the light in faint rainbow colours and wrinkling when you tip the cup. It looks like grease, and the usual conclusion is that the kettle is dirty or the tea is stale. Neither is true. The film is a layer that forms where the tea meets the air, and it needs three things: compounds from the leaf, oxygen at the surface, and — decisively — calcium and bicarbonate from hard water. It appears within minutes on a still surface and is broken up by stirring, which is why you mostly see it on a cup you walked away from.
How to tell, and how to stop it
The test is the water rather than the tea. Make the same tea with distilled or heavily softened water and the film largely does not form; make it in a hard-water area and it forms every time, which is why this is a question people ask after moving house. A slice of lemon disperses it, and so does milk, which is part of why the film is mostly a plain-black-tea phenomenon rather than a builder's-tea one. None of this is a sign that anything is wrong: it is ordinary surface chemistry between an ordinary drink and ordinary tap water, it is not a contamination signal, and it is not a reason to throw the cup away. If it bothers you aesthetically, filtering the water is the fix, and it is the same fix that improves the taste.
Stains and scale are two different marks
Hard water leaves two residues in teaware and they are confused constantly, because both are cured by an acid. Limescale is white to grey, chalky, and builds up inside a kettle and around a spout; it is calcium carbonate out of the water and has nothing to do with tea. Tea stain is brown, smooth and sits on the inside of a cup or pot; it is oxidised polyphenol from the leaf, and it forms whatever the water is like, faster in a hard-water area. Descaling with citric acid or with a vinegar solution removes the first and does little for the second; a mild abrasive such as bicarbonate of soda lifts the second and does nothing useful for the first. Knowing which mark you are looking at saves scrubbing the wrong one.
The exception, which is deliberate
Do not scour the brown patina out of an unglazed clay pot used for one kind of tea. In a Yixing or similar porous pot the stain is the seasoning, and the whole argument for a dedicated pot rests on it. Rinse with hot water, never with detergent, and leave it. The rule that a stain should be removed belongs to glazed porcelain, glass and steel — surfaces that are not supposed to hold anything.