Lingodbhava puja is a special ritual performed during midnight on Maha Shivaratri in all Shiva temples. Lingam or Lingodbhavamurthy is an iconic representation of Lord Shiva to whom we offer our pujas. Why Shiva is worshipped in the form of Lingam?
Here is a legend explores the story of Lingodbhava which is associated with Thiruvannamalai Arunachaleshwara Temple. This legend is mentioned in Kurma Purana, Vayu Purana, and the Shiva Purana.
At the end of a kalpa (4.32 billion years of period in Hinduism as per Vishnu Purana and Bhagavata Purana), when Vishnu was in his Yoganidra (cosmic sleep), Brahma emerged from illumination and introduced himself to Vishnu as the Creator of the Universe. Vishnu also introduced himself as the architect of the universe. When an argument of superiority has arrived, a huge column (lingam) of fire has emerged.
To trace the origin of the column of fire, Lord Brahma turned as a swan and flew upwards and Vishnu manifested as a boar and burrowed down into the earth. Neither of two is able to find the trace of the origin of the column and surrendered to Lingam.
Lord Shiva appeared in front of them and explained the story of their origin and no one is superior among them. The huge column of fire represents cosmic nature of Lord Shiva whose origins were not found by Brahma or Vishnu. This is the main fact behind the worshipping Shiva the form of Lingam.
The legend mentioned above was believed to be held at Thiruvannamali Arunachaleshwara temple. Thiruvannamalai hill is known to be a representation of Lord Shiva in linga form.