How ammeter works
According to Lorentz force principle- if a current carrying conductor is placed in magnetic field , the conductor experiences force on it. This principle is used to move pointer in ammeterInside a ammeter there is a moving coil (if a conductor wire wound on a core then it forms coil) placed in a magnetic field produced by permanent magnet. A pointer is connected to coil. When current is passed through coil a force acts on it(according to Lorentz principle) and coil rotates and therefore pointer also rotates on scale showing current value.
Why it is connected bin series :-
Ammeter measures value of current flowing in circuit, so current should flow inside ammeter to give proper result. And it has very low resistance to ensure the correct measurement of current in the circuit.
If it is connected in parallel across any load then all current in circuit will choose lower resistive path (i.e ammeter) to cause it's circuit to be damaged. Hence it is used in series.