They way I have built one:
3V battery. Red probe = high impedance voltage. Black probe = a comparator set to just south of Vcc /2. And a high impedance shunt to ground (which forms a resistor ladder with the red probe high impedance output.... say 10K on each probe). Tune comparator setpoint.. typically to where continuity is somewhere between 10-500 ohms. Voltage drop of, say, a P-N junction is too great to show continuity, of course. It will only beep on a low impedance connection and send somewhere around 0.15mA through the connection.... not enough to harm anything.
Across a 1M ohm connection, voltage drop across the probes could be approaching 3V, but at current approaching zero. But if there's any conduction, voltage drop is very minimal and max current 0.15mA. Completely safe, IMO. Max power dissipation by the circuit-in-test would be when circuit is ~20K, which would equate to 0.1125mW. Across a PN junction, power dissipation would be sub 0.1mW. Perfectly safe for any electronics, I think.
I don't suppose a multimeter does it much different, although there are many ways to skin a cat. Comparator. Op amp plus ADC plus software. W/e. Since the multimeter also has to measure resistnace, it has the opamp and ADC, already. But a comparator has lower latency. The good DMM's also have a latching circuit, so there's a minimum duration of beep when continuity threshold is reached. Done in software, 99% of the time, most likely. But could be done with a one-shot monostable multivibrator circuit.