"How does it work"
Simplified version because my understanding of the chemistry is weak.
Inside the softener is a hard cylinder. The incoming supply runs through this, at mains pressure. Inside the cylinder are beads of a synthetic resin. This material has the property of absorbing calcium from water. Hard water is caused by calcium carbonate (dissolved from limestone rocks).
The resin has a limited capacity for absorbing calcium. When it is saturated, it can be forced to release it by immersion in a strong salt solution.
So, the softening machine has an adjustable water meter or timer, and when this indicates that the resin is saturated, it initiates a regeneration cycle. This bypasses the supply to the taps to prevent salt getting into them, and sucks salty water out of the bin into the cylinder, where it displaces the calcium, and the machine runs it into a drain or wastepipe. It then rinses away the remaining salt, into the drain. The resin is then ready for use again, so the machine closes the regeneration valves and opens the soft water supply to the taps.
During regeneration, the taps still work. The machine feeds them either with unsoftened water from the incoming main, or switches over to a spare softener. The ones that supply unsoftened water to taps during regeneration have a timeclock so it happens when you are unlikely to be using the taps much, for example 2am.
Regeneration typically occurs at intervals of one or two weeks, depending on capacity of machine and amount of water used.