Varaha is the boar avatara who descends to lift the earth from the cosmic ocean after the asura Hiranyaksha carries her away, killing him in single combat. The Bhagavata Purana tells it in Canto 3, and the Varaha Purana expands it; the earth he lifts, Bhumi, becomes his consort and the mother of Naraka. The boar who raises the earth is older than the avatara - the Brahmanas tell it of Prajapati - and the Vaishnava telling is the later layer.
Modern Practice
Varaha is invoked for the recovery of something taken or sunk - a home, a livelihood, a land - and his image stands at the root of the Venkateshwara hill at Tirumala, where the oldest shrine is his. The practice is the lifting, not the mourning.