Magic and superstition from many different traditions were added to Hindu and Buddhist beliefs in the ancient Indian imagination. Just like people further east, Indians were capable of accepting syncretism in their religious beliefs and observances – that is, it is possible to believe apparently contradictory ideas and concepts at the same time. For example, some of the earliest forms of spiritual belief are based on animism, the belief that physical phenomena have some kind of supernatural life. Rivers, stars, hills, the skies and harvest weather are all examples of phenomena which people have believed, and some still do, that they are all alive. Hence, it is sensible to provide offerings to these spirits to ensure that they are kind and do not become malicious. In many countries, shamans perform sacrifices and rites to try to ensure that the spirits do not bring disease or death to newborn babies or expectant mothers, for example.
Some of these spirits took physical form in the ancient Indian imagination as monsters. There were all sorts of flesh-eating vampires, evil and cunning goblins, the ghosts of the deceased who were all too willing to roam the earth and take vengeance on anyone they believed had done them wrong, as well as the demons who spoiled sacrifices, ate the flesh of the recently dead and possessed babies who would then die.
Since the world was such a dangerous place, therefore, it made perfect sense to use magic to try to control the spirits, for good or for ill. The number of supernatural beings believed to exist in the universe seems to have multiplied over time, so that eventually there were millions of gods, goddesses, devils and demons, miscegenated creatures and fantastic, resplendent dragons and angels all floating about in the enormous cavity of the universe, going about their business. Just like the ideas behind Vajrayana Buddhism and Tantrism, people believed that the proper magic spells and chants, perhaps assisted by sacred diagrams and charms and purposeful breathing exercises could persuade one or more of these supernatural creatures to do the bidding of the magic-user. Usually, of course, cause and effect relationships exist in that the supernatural being will require a sacrifice of some sort in return for rendering the required aid. Inevitably, virgin maids and children were most highly prized in black magic rituals, although body parts and rare and expensive items were also used.
The result was that, as people walked about the world, they believed that dangers existed in very part of the landscape and it was necessary, therefore, to keep in mind all kinds of charms and protections.