When filing for Bankruptcy under Chapter 7 and Chapter 13, certain property of the debtor is exempt from the Bankruptcy estate, which means simply that the debtor can keep that property (and the trustee and creditors can't take it).
When filing a Bankruptcy as a resident of Massachusetts a debtor can choose to use the exemptions allowed under either State or Federal law, but you must choose one or the other. There are many exemptions that are similar under both schemes and many that are different.
As of April 14, 2009, the allowable exemption for motor vehicles was $3,225 under the Federal Exemptions and $700 under the Massachusetts Exemptions. This means that if you choose the Federal Exemptions you can keep your car so long as it has less than $3,225 in equity (value of the car minus balance of the loan).
In addition to the value of the motor vehicle exemptions, the Federal Exemptions also allow for some "wild-card" exemptions: $1,075 generally and $10,125 of unused homestead exemption. If you have few other assets besides your car you may be able to use these "wild-card" exemptions to exempt further equity in your car if it has equity over $3,225.
If your car is subject to a loan you will have to reaffirm said loan or the car will be surrendered to the lender or trustee for sale. For more information about available exemptions click here.
UPDATE: The Massachusetts Exemptions have recently changed. For more information read our post on the changes: New Massachusetts Property Exemptions: The Return of 2 Cows, 12 Sheep and 2 Swine.