An ammeter works by measuring the voltage across a very small resistor that is placed in series with the load. By Ohm's Law, current is voltage divided by resistance. Knowing the resistance of the series circuit and conducting those amps to a device that reacts differently with varying amount of amps you can accurately measure the amps of a circuit. Analogue meters use an electromagnetic coil that winds itself to different tensions depending on the amount of current. Connect it to a needle and put a chart behind it that has been calibrated to the coil and you have created a device for measuring current. The strength of the electromagnetic field is proportional to the current, or amps, so the distance the needle moves will also be proportional to the current.