I sense that you desire to know how a fire alarm system works.
The fire alarm system is made up of devices to detect fire (smoke detectors, heat detectors, pull stations, waterflow switches, etc.) and devices to let people know about the fire (horns, strobes, bells, speakers, etc.)
Between these devices and connected with wires is a control panel. The control panel has a power supply to provide power to the system as a whole, and to charge the backup batteries. The backup batteries are there to keep the fire alarm system powered if the utility power quits.
The control panel also has input and output circuitry, circuitry that makes sure everything is always connected (supervises the inputs and outputs), and circuitry to activate outputs when something happens on an input.
When a detection device senses fire, using building wiring, it tells the control panel about the fire. The control panel uses the building wiring to activate the devices that let people know about the fire.
These are the basic parts to any fire alarm system. Learning the variations on these systems requires a lifetime of learning, and new variations are constantly being developed.
Go out and learn the variations.