Don’t all the heads go off at once? I’m sure I’ve seen this happening on tv!

No, each sprinkler head is effectively a self-contained heat detector and will only operate when the predetermined temperature at which it is manufactured to operate at is reached. This is normally 68°C (for glass bulb type) or 72°C (for solder type), so only the heads in the immediate vicinity of a fire will operate. This is also why sprinklers do not ‘false alarm’ - unlike smoke detectors, they will not operate if you burn the toast or let steam from your shower escape from the bathroom. Operating a keyswitch or lever cannot turn on closed type sprinkler heads. The depictions of sprinkler systems on tv and in films is invariably wrong!