In folktales, an imp is a mischievous, devilish creature, like a small demon. When you were little, your grandfather would tell you stories about elves, fairies, imps, and other mythical creatures.
Impe is an Old English word meaning young plant shoot. It was eventually applied to the offspring of people and later used pejoratively in the sense of offspring of the devil. The devilish meaning remains, but an imp can also be any mischievous person, especially a small child. You might call the boy you babysit an imp if he's in the habit of playing tricks on you — like locking you out of the house.