There is a federal law called the three-day cooling-off rule that protects consumers who have purchased something that costs $25 or more outside of a regular place of business. However, this rule does not apply to automobiles purchased from dealerships. There is no federal law stipulating that a returned car must be accepted within a certain window of time, but individual states may offer further protection for consumers.
The three-day cooling-off rule was designed for the purpose of protecting consumers from bad purchases made in door-to-door sales or by scammers setting up temporary business locations that are vacated shortly after the purchase. It was not intended to apply to the sale of vehicles.
Some states may offer consumer protection under their "lemon laws," the section of legal code that covers vehicle purchases. Lemon laws generally require the buyer to demonstrate the vehicle has serious defects, usually with an unusual number of repair attempts shortly after purchase.
Dealerships may voluntarily take a car back at their discretion if it has serious performance problems or if features were promised that were not actually included. If the sales price was much higher than general market value or if the buyer misrepresented their creditworthiness in order to finance the vehicle, the vehicle may also be returned.