The film is the product, and it is three nanometres thick
Stainless steel contains at least about ten and a half per cent chromium. That chromium is not there for decoration: it reacts with oxygen at the surface and forms a layer of chromium oxide one to three nanometres thick — a few dozen atoms. That film is what resists rust, it forms again by itself if you scratch it while oxygen is present, and it is the only thing standing between the steel and the air.
Which tells you what actually threatens it: not water, but water plus chloride plus no oxygen. Chloride ions — from salt, from bleach, from a chlorine-based bathroom spray — are small enough to get through the film at defects, and once a pit starts it does not stay small. The inside of the pit becomes the anode, the surrounding surface becomes the cathode, and the pit fills with metal chlorides that hydrolyse to acid. The local pH drops, more chloride is attracted in, and the pit deepens itself. It is a self-driving reaction, which is why a pit goes from a pinprick to a visible crater in a matter of weeks while the rest of the surface stays perfect.
And a pit is not repairable, in the way that a water ring is. Chromium dissolves preferentially inside that pit, so the bottom of it is no longer the same alloy — it is steel with less protection, not stainless steel with a hole. You can polish the pit flat and it will look fine for a while, but the metal underneath cannot re-form the film it has lost, so the rust comes back in the same place. That is why "I scrubbed the rust off and it came back" is such a common story: the scrubbing was not the repair.
Three marks, three answers
White rings and rainbow smears are on the surface. A white ring is calcium and magnesium left behind when the last of the water evaporated, so the cure is acid — vinegar, or citric acid at 50 g per litre — sprayed on the cloth rather than on the steel, worked along the grain, then dried immediately. A rainbow sheen is an oil film, and wants the opposite: washing-up liquid in warm water, or a little alcohol. Both come back if you let the steel air-dry, so the last step is always a dry cloth.
Small brown dots that lift under a fingernail are usually not the steel rusting at all. They are iron that came from somewhere else: steel wool that shed, a carbon-steel pan or a cast-iron skillet rubbed against it, rusty water from an old pipe, or a can left standing in a damp sink. Foreign iron rusts on top of the film, and it comes off with an oxalic-acid cleaner — the pink-stain removers sold for stainless and for ceramic hobs — worked along the grain with a cloth, then rinsed and dried. What you must not do is attack it with steel wool, which both scratches the surface and deposits more iron for next time.
Dark dots that will not lift, and that feel like a tiny dent under a nail, are pitting. Probe one with a needle to find out how deep. A pit under about half a millimetre can be eased with a very fine abrasive so that it stops collecting water, and then kept dry and lightly oiled; anything deeper, or in a cluster, is not a repair but a change of how you use the object — and a sink or a pan with a pit through the wall is finished. In all three cases the habits that prevent the next one are the same: wipe it dry, never store salt or vinegar on it, and keep chlorine-based cleaners away from it.