Whether it’s the kernel of a pistachio nut or the kernel of wisdom in a story, kernel can refer to the center or essential part of something.
The word kernel traces back to the Old English word cyrnel, which is related to corn. If you have ever eaten corn on the cob, you ate the kernels. Popcorn is made by heating corn kernels until they explode, or "pop." Like these examples, sometimes kernel means "a small bit" or "single piece," as in a story someone tells you that couldn't possibly have happened as described, but still has a kernel of truth about human nature.