A charged particle follows a helical path in a uniform magnetic field. This is because the component of its velocity parallel to the field is unaffected, while the charged particle executes circular motion in the perpendicular direction.
The Earth's magnetic field is a natural magnetic mirror. The magnetic field gets stronger nearer to the poles, and the charges follow a helical trajectory along the field lines. The field lines "bunch" together, causing a component of the force that negates the velocity along the axis of the helix. This causes the particle to bounce back when nearing a region of strong magnetic fields.
This is exactly what happens in the Van Allen belts: the charged particles bounce back and forth between regions near the north and south (magnetic) poles, following the magnetic field lines in a helical motion. Such motion is also the reason for the Aurora appearing closer to the poles.
To get a rough understanding of the distribution of protons and electrons, note that they have the same charge (up to a sign), but the mass of a proton is much larger (by $\sim 1836$) than that of an electron. It would take a much larger magnetic field i.e. that found at lower altitudes, to "bind" a proton to a small radius of the helical path, than for an electron of comparable speeds.
In addition to this, however, there also seem to be other effects preventing high energy electrons from coming in to lower altitudes. Overall, the dynamics of the Van Allen belts are rather complicated and is an active field of research.