Let's say you have a neutron shooting through some solid matter, you have a couple things that can happen. One is that the neutron can just not get close to any nuclei. This depends on the density and thickness of the matter the neutrons pass through. Another is that the neutron can come close to a nucleus and scatter off of it. Or, a neutron can come close to a nucleus and either be absorbed by it or cause some neutronic nuclear reaction (such as neutron induced fission).
There are two super interesting things that are relevant to neutron scattering off of Hydrogen nuclei (protons). One is that due to quantum effects the de Broglie wavelength of the proton is larger than for other nuclei (partly due to the standard inverse relationship between energy and wavelength). This means that protons are a much larger "target" than more massive nuclei in terms of neutron scattering, which is a bit opposite of what you might imagine from a non-quantum perspective. Additionally, protons and neutrons are nearly the same exact mass, within single digit percentage points. Now, let's say you take a tennis ball and you throw it at a wall, it'll bounce off the wall at nearly the same speed, right? And almost exactly the same thing will happen if you throw it at a bowling ball. This is just the way momentum and kinetic energy works. But if you throw a tennis ball at another tennis ball and you hit it dead on then you'll transfer all of the momentum from the first ball to the second, just as in a Newton's Cradle or in a game of billiards.
Those two facts together mean that Hydrogen nuclei are super good at slowing down neutrons. They are much larger targets to the neutrons and when neutrons scatter off of them the neutrons tend to lose a lot of their momentum. So it doesn't take many scatterings before the neutrons are no longer at ionizing energy levels and aren't dangerous to humans (they will decay with a half-life of several minutes into protons and electrons (and neutrinos)). Meanwhile, those protons will get a ton of momentum foisted onto them, but they are charged particles moving through atomic matter chock-a-block with other charged particles so they don't get far. The net result is that neutron radiation is blocked.
Polyethylene is basically (CH2)n so it contains lots of Hydrogen atoms (water is also a good neutron moderator/blocker). Additionally, Carbon is also one of the better neutron moderators, so the combination is pretty effective.
On the other hand, lead is just a bunch of heavy nuclei. Which aren't actually that "big" from a neutron's perspective due to quantum effects, and most of the time when a neutron hits a lead nucleus it's just going to ricochet and maintain almost 100% of its original speed/energy, so you need a lot of lead to make a difference.