Insurance can vary - my insurance company has a 5 day grace period after purchasing a car, so I can have insurance, buy a car, and then deal with the VIN and insuring that actual vehicle later... but that's because I've had insurance with them for some time.
In other cases, you agree to buy the car, you get the VIN number, you get a quote for insurance on that VIN number & pay with a credit card, the insurance company can fax the info to the dealer, you can take possession.
Inspection will vary as well. Some dealers will do it for you, others will force you to do it; states may also vary. Usually, you end up registering the vehicle with the dealer, getting a 30-day temporary registration (they put on a paper license plate), which gives you time to get permanent license plates, inspection, etc.