To understand why the current flows in opposite directions on each side of the coil, imagine a simple coil with two turns of wire. If you connect a battery to the ends of the wire, the current will flow in the counterclockwise direction around the coil. This is because the positive terminal of the battery attracts electrons, and the negative terminal repels electrons. The electrons will therefore flow from the positive terminal of the battery to the negative terminal, and the path of least resistance is through the wire of the coil.
However, when the current reaches the second turn of the wire, it has to flow in the opposite direction in order to get back to the battery. This is because the electrons are now being attracted to the negative terminal of the battery, and they have to flow against the magnetic field that has been created by the current flowing in the first turn of the wire.
As a result of this, the current flows in opposite directions on each side of the coil. This creates a magnetic field around the coil, and the strength of the magnetic field is proportional to the amount of current flowing in the coil.