Mandrakes are a real type of plant from the genus Mandragora. They have odd roots that branch off, often looking like little people. Every part of the mandrake is poisonous, so it's no wonder that stories surrounded them.
Mandragoras are supposed to be little demons given to sorcerers by the devil to serve the sorcerers in a time of need. The mandrake plant makes a famous appearance in Harry Potter, too, where it can cure petrification by a basklisk and kill people with its scream.