I'm no expert on this but my understanding is that most of the affordable UPSes you see online are "standby" or "offline" UPSes, which normally pass the mains power directly through, but in the case of a power failure, switch to battery power within milliseconds. I have one of these for my computer, and mostly it just sits there silently, but when the power is cut it starts making a lot of noise.
There are also "continuous" or "online" UPSes, which constantly take energy from the mains to charge a battery, then use a power inverter to convert the DC from the battery into AC for whatever you plug in. I believe these are a lot more expensive (and probably a lot noisier too). But they do regenerate mains power as you describe.
If you're looking on the internet and seeing UPSes available for quite cheap, they're almost certainly offline UPSes, which would probably not be very useful for hifi. They might keep your hifi on for a few minutes during a power cut, but I imagine you'd need quite a hefty one to get more than a few minutes if you have all your kit plugged in. And the power they supply will be exactly the same as the mains, except during a power cut.