When a current-carrying conductor is placed in a magnetic field, the conductor experiences a force which acts to push the conductor out of the field. This is the principle of operation of an analogue ammeter and voltmeter.
A light coil of wire supporting a pointer is placed between the poles of a permanent magnet. Whenever the coil rotates, the pointer sweeps across an appropriately-calibrated scale. When current flows through the coil, a torque acts to rotate the coil. However, the movement of the coil is restrained by a pair of hairsprings. When the torque due to the current is balanced by the restraining torque of the hairsprings, the coil stops rotating. Thus, the angle through which the coil rotates is proportional to the current flowing through it, and the instrument is calibrated such that the pointer directly indicates that value current on a curved scale.
Ammeters and voltmeters both work on the same principle. In the case of the voltmeter, the current which operates the coil is proportional to the voltage appearing across the instrument. The difference between the two instruments is the way in which resistors are used, within the instruments, to make one suitable for measuring current and the other suitable for measuring voltage.
Ammeters must be connected in series with the circuit under test, whereas voltmeters must be connected in parallel with the circuit under test.
Digital ammeters and voltmeters work on a completely different principle, using an electronic 'gate' to switch on and to switch off a series of pulses. The time for which the gate is 'open' is a function of the value of the current or voltage being measured -e.g. the larger the current, the longer the gate is held open. These pulses are then counted and, in simple terms, the greater the number of pulses counted, the greater the current or voltage being measured. The output is then presented, directly in amperes or volts, on a LED or LCD screen.