Some multimeters have a setting called NCV, or Non-Contact Voltage tester. An NCV is useful because it can detect a powered wire or cable hidden behind a wall.
The NCV tester works because of a property of electrical current. As electricity flows through a wire, it creates an electromagnetic field. The NCV could be measuring the capacitance change (electric field) or the inductance change (magnetic field) within a close range. This can be enough to help trace a live wire behind drywall.
The NCV may not detect voltage if the wire is contained in or behind a metal object. The metal can block or reduce the electromagnetic field, leading to a false reading. It is best to use the NCV in conjunction with other methods (multimeter, for instance) before working on a circuit.