If the vehicle gets sent to the shop for the same repair for up to 3 or more times for the same repair or is down for longer the 30 days it is considered a lemon and is supposed to be purchased back by the manufacturer under state laws.
Every state has it's own lemon laws please see the following link for your states:
http://autopedia.com/html/HotLinks_Lemon2.html
You DO NOT need to get an attorney to get a car returned under the lemon law. Keep all copies of service records or go to any dealer and ask for a print out of the history of your vehicle(service dept and give them the VIN#) They must provide you with this information.
If you find that you fall under the lemon law try to settle with the dealership, but your best bet is to contact the manufacturer.
If the vehicle was purchased used and had no factory warranty remaining, the only way to get out is to show that the dealer frauded you. If they did fraud you under the purchase make a complaint to the Motor Vehicle Dept. as they are licensed by them.
Hope this helps