Why An ohmmeter contains its own battery or current source. It pushes a small, known current through the component under test and measures the voltage that develops across it, then uses Ohm's law (R = V/I) to display resistance. Because the meter supplies its own current, the circuit being measured must have power removed first, or the reading will be wrong and the meter may be damaged.
Watch out The choice about applying a variable voltage and watching current change describes a sweep or curve-tracer style measurement, not how a simple ohmmeter works; the variable-resistor choices describe a bridge or rheostat arrangement, not a modern ohmmeter.
Ohmmeter = Ohm's law in a box: it injects known current I, reads V, divides to get R. Always power off first.