Is it like dante's were you go to a different place depending on what you did?
What do you have to do to go to Hindu hell?
It's a little confusing. The oldest texts imply infinite hells and provide only the vaguest descriptions (a bottomless hole), but most religious texts state 7-28. They are quite specific in both, sin and punishment, and do resemble Dante's circles to some degree. eg. Shukramukh is a part of the underworld where people who're supposed to provide justice (rulers/judges) are punished, but they're also sent here if they sentence a priest to any form of physical punishment. It really is clear how the priests altered the religious texts to benefit themselves.
The stay in most of them is temporary, until your rebirth, but there are a few which imply eternal torment.
Fulfilling your 'duty' (dharm) and doing 'good' (karm) are how you avoid them. As you go through life, there are a few things (pilgrimages, singing specific chants, rituals) you can do to be forgiven for specific sins, but this must be done in the same life as the one in which the sin was committed.
If you can't bring yourself to be a decent human being, fear not, you can have a priest perform a ritual at your deathbed, or even after, according to what I hear now, where some of your sins can be, erm, 'disregarded', and this forgiveness, btw, is by some strange quinkydink, directly proportional to the 'donation' made to the priest on your behalf. Not only does this allow those sins to be forgiven, it also gives you a better shot during your next reincarnation.