What constitutes the sale and legal transfer of ownership on a vehicle how long does it take and what is DMV's role?

You can sell a car for any reason. There doesn't have to be a reason. The owner signs the title over to the buyer. They buyer then takes the title to the DMV and gets the title into their name. The buyer may have fees or taxes charged to them. They can find out what they will be before buying the car.