Nerves get stimulated under the cathode, according to the conventional current direction. But in some research, it is said that anodic stimulation or anodic current stimulation can activate neurons. How does it occur physically? The picture below shows the two types of stimulation, but I can't get it.
Both anodic and cathodic current pulses can evoke neural activity, as shown in your image.
You have to be aware that the current direction is arbitrary and the 'convention' you mention depends on your discipline. In electrophysiology, the anode is generally considered to be the positive electrode, the cathode is generally the negative electrode and the anode the positive. In physics however, current is assumed to be positive (due to historical reasons) and therefore the definition of anode and cathode is opposite.
Secondly, there is no reason to assume that nerves under the cathode are stimulated (and not under the anode), as is shown in your picture - in both cases a neural response is elicited. For example in cochlear implants, biphasic current pulses are used, because these are safer than simple anodic or cathodic pulses. Biphasic pulses are charge balanced and consist of an anodic phase and an opposite cathodic phase. (Cochlear implants are arrays of electroides implanted in the inner ear that stimulate the auditory nerve directly and are used to treat sensorineural deafness).
In animals and humans, both anodic and cathodic pulses can evoke neural responses. In human cochlear implant users, the anodic phase is more effective than the cathodic phase. In contrast, in animals usually the opposite is observed. The reason for this discrepancy is unclear (Machery & Cazals, 2016).
Whatever the exact reason of their differing effectivity in evoking neural activation - both anodic and cathodic current pulses can evoke neural activity.
In both cases you generate loops of current, with current densities determined by the overall conductive geometry. So a current flowing from the cathode (negative electrode in electrophysiology), and thus imposing negative charges onto the outer surface of an apposed neuronal membrane, would create a local depolarization there, but would also at a distance draw negative charges away from the outer surface of the membrane, albeit with a lower current density, thus creating a local and weaker hyperpolarization there. Now, consider what happens when you switch to an anode. Current flowing from the anode would impose positive charges onto the outer surface of an apposed neuronal membrane, creating a local hyperpolarization there. But it would also draw positive charges away from the outer surface of the membrane at a distance, creating a local and weaker depolarization there. Crank up the current and you can make that depolarization at a distance strong enough to reach threshold. You would thus excite the membrane at that point, despite hyperpolarizing the membrane closer to the anode. Because the conductive geometry of biological tissue, and thus the current loop pathways, can be quite complex, the effectiveness of cathodal versus anodal stimulation can vary and be hard to predict. Thus, one usually ends up choosing one over the other on purely empirical grounds.