There are two basic types of softener - single cylinder and dual cylinder.
Single cylinder are cheaper but you have hard water for the time it takes to regenerate (an hour or two). They try to minimise the effect of this by arranging regeneration at night but this can go awry if you have an irregular usage pattern. They use all sorts of tricks with computers watching your usage, predicting when you will need to regenerate and regenerating the night before; this is fine until you, say, wash the car or go away on holiday, which messes up your usage pattern.
Dual cylinder models cost more but simply switch from one cylinder to the other when regeneration is necessary and then regenerate the idle cylinder. This has the effect of ensuring that your water never goes hard, as it takes less time to regenerate an exhausted cylinder than it does to run enough water to exhaust the other one.
Regeneration is done by running salt solution backwards through a cylinder and then rinsing it before putting it back into use. This means that you have a salt reservoir (just like a dishwasher) that you have to fill occasionally. Some models use salt granules, others use block salt, which is just highly compressed salt so is more convenient to use and easier to store. To give you an idea of salt costs I have just bought £100 worth of block salt and it's almost exactly 5 years since I last bought the same quantity.