(i) Electric current flows from the positive (+) terminal of the cell, through the circuit, to the negative (-) terminal. In Fig. 4.4a the + terminal is at the right end of the cell. So the current goes up the right-hand wire to end B, through the turns of the coil from end B to end A, and then down the left-hand wire back to the - terminal, as shown by the arrows.

(ii) When current flows through the coil, it produces a magnetic field around it, so the coil with the iron nail becomes an electromagnet with two poles. The compass needle is a tiny magnet. The magnetic field of the electromagnet attracts one pole of the needle and repels the other, so the needle turns. When the current stops, the magnetic field disappears and the needle returns to its original direction.
(iii) Reversing the battery terminals reverses the direction of the current in the coil. This reverses the poles of the electromagnet: ends A and B exchange their poles (if end A was a south pole, it now becomes a north pole). So the compass needle is still deflected, but in the opposite direction: the pole of the needle that was attracted towards end A is now pushed away, and the other pole turns towards end A.