A Mexican jumping bean is a phenomenon native to Mexico, where
it is known as a brincador ("hopper"). Physically, Mexican jumping
beans resemble small tan to brown beans. They are a type of seed in
which the egg of a small moth has been laid. It is the moth's larva
which makes them "jump". The beans themselves are from a shrub of
the genus Sebastiania (S. palmeri or S. pavoniana), itself often
referred to as the jumping bean, while the moth is a member of the
genus Cydia, called a jumping bean moth.
After the egg hatches, the larva eats away the inside of the
bean, making a hollow for itself. It attaches itself to the bean
with many silk threads.

The larva may live for months inside the bean with varying
periods of dormancy. If the larva has adequate conditions of
moisture and temperature, it will live long enough to go into a
pupal stage. Normally, in the spring, the moth will force its way
out of the bean through a round "trap door", leaving behind the
pupal casing. The small, silver and gray-colored moth will live for
only a few days.
The larvae jump as a survival measure in order to protect
themselves from the heat, which can cause them to dry out. The
ultraviolet rays from the sun stimulate them to jump, even in cool
temperatures, but leaving the beans in the sun for extended periods
will dehydrate and kill them.
Jumping beans are still widely available for sale in the United
States. In the UK they were a common novelty item in the 1970s.
They are a popular scientific and classroom project even
now.[citation needed] When the bean is abruptly warmed, for
instance by being held in the palm of the hand, the larva twitches
and spasms, pulling on the threads and causing the characteristic
hop. "Jump" is often an exaggeration, but the beans do noticeably
move around.
The beans should become active if one holds them in the hand
(out of the box) for a few minutes. The beans should also appear to
be a very slight shade of green on the side. If the bean starts to
turn brown , that indicates it is dying. If one shakes a bean near
one's ear and hears a rattle inside, the larva inside has died.
A plastic toy under this name was manufactured and sold in
packages containing several devices in the 1960s. It resembled a
"time release" capsule and had a metal ball inside. When the
surface on which the capsule was laid was tilted, the ball would
roll to the other end and make the capsule twitch.
Congratulations to OldScouterDad and
TagAlong on the FTF!