How does a fuse prevent battery overcharging/discharging?
A fuse doesn't protect a battery from overcharging or discharging.
It also doesn't prevent a short circuit, however if a short circuit happens then hopefully the fuse will blow preventing fire or damage to equipment caused by said short circuit. The fuse blows and makes the system safe if correctly installed but the short circuit is still there and must be found and repaired.
If the fuse is not blown then it just looks like a wire to the rest of the circuit, so your battery is free to overcharge all it likes, or trickle discharge with no opposition if your circuit allows, a fuse only cuts connection in the case of drastic over-current, or other parameters sometimes, like temperature, in the case of specialty fuses.
I think the easiest option for you would be to buy a premade 48v NiCd charge controller, make sure it's 48v compatible and meets the current draw requirements of your system, and also is compatible with the input voltage level you intend to supply it with. Google search gives me plenty of results that fit the bill (assuming solar as the charging source) but as always check your specifications and make sure it's rated to charge a 48v NiCd battery at your available voltage, well over your expected current levels, both charging and usage current, with a protection fuse at the least between the charge controller and battery but if you are not sure then it can't hurt having a correctly rated fuse near the beginning of every live line until you are sure which ones you may be able to safely omit. Also, make sure the wires in your system are big enough to easily handle your highest expected current at any point in the system. You could certainly make a circuit yourself but that would require a lot of understanding, and as mentioned, 48v is dangerous and as such not a project to try and learn fundamentals with.
(I think this answer would be better as a comment but I don't have the rep yet, mods please delete if appropriate)