Double-Jointed Knees
Horses' knees do not lock like human knees because they are double-jointed. While standing, leg muscles keep the knees straight.
Lying Down
When a horse wants to lie down, the muscles relax and the knees bend. The shaking occurs because the muscles briefly try to keep the legs straight even while the knees are bending.