Legend has it that once, there was a powerful king named Hiranyakashipu. He was a devil and was hated for his cruelty. He considered himself to be God and wanted everybody in his kingdom to worship him like one.
However, his own son, Prahlada, was a devotee of Lord Vishnu and refused to worship his father. Angry with the disobedience of his son, Hiranyakashipu tried killing his son a number of times, but nothing worked. He then asked his evil sister, Holika, for help. Holika possessed a special power of being immune to fire.
So, to kill Prahlada, she tricked him into sitting with her on a pyre. But due to her evil intentions, her power became ineffective and she was burned to ashes. On the other hand, Prahlada gained this immunity and was saved. This is why the first day of Holi is celebrated as Holika Dahan and symbolizes the victory of good over evil.
A few days prior to the festival, people start collecting wood and other inflammable things for the bonfire. The combustible materials are then gathered in a pyre in colonies, community centres, parks or other open spaces. On top of the pyre, an effigy of Holika is placed to be burned as per the legend.
The first day of the festival is celebrated as Holika Dahan or Chhoti Holi. After sunset, people gather around the pyre, perform puja (prayers) and then light it. People even sing and dance around the pyre, as it symbolizes the triumph of good over bad.