A colonel is an army officer of high rank. The officers pounded open the walnuts with hand grenades, scattering the "colonels" which is meant to sound like "kernels". Kernels are the seed and hard husk of a cereal, especially wheat. The joke is using language found in the military while explaining opening walnuts.
To crack open the walnuts , several officers foolishly pounded them with hand grenades , scattering the colonels everywhere .