Many people protect their homes with locks or a fire extinguisher—but neglect the security of their digital devices. Yet software updates effectively ward off cyberattacks.