The magnetic field between the poles of the horseshoe magnet in fig 21.4 B curves in the counter clockwise direction.
The magnetic field lines due to a straight current carrying conductor is given by the right hand thumb rule. This rule is stated as follows: Imagine holding the current carrying conductor in your right hand with the thumb pointing in the direction of current, then the direction in which your fingers curve around the wire gives the direction of the magnetic field lines. The direction of the magnetic field lines at a point gives the direction of magnetic field at that point.
On applying this rule, it can be seen that the magnetic field due to the conductor shown in Fig 21.4 B curves in the counter clockwise direction.