When you buy a car you usually have between 10 to 30 days to register the vehicle if you plan to drive it after you buy it.
After buying a car you need to register the vehicle as soon as possible so that you can transfer the vehicles title into your name and remove the car out of the other persons name as well.
If you just buy a car from a private party then you don't have to register it until you plan to drive it but you should get it registered within 10 to 30 days at most.
Some states have their laws in place where you have to get it registered in your name when driving it which is between 10 to 30 days.