There are two systems - Chandramana and Sauramana.
Chandramana is based on the movement of Moon and Sauramana is based on the movement of Sun.
In Chandramana, name of the month is associated with nakshatra (constellation) near or on which the Moon is placed on Purnima. For example, in the lunar month of Chaitra, Purnima occurs when Moon is in Chitra Nakshatra, in the month of Vaishakaha in Vishakha nakshatra and so on.
In Sauramana, a month is when Sun traverses a particular Rashi. For example during the month of Simha, Sun traverses the Simha Rashi.