Yes, you need to have insurance in place before you drive the car away. If you are purchasing it from a lot, you will most likely be presented with the option of purchasing coverage through the dealer. This is not a good idea—you do not have the opportunity to shop around, compare prices and choose the best policy or insurer. Coverage purchased through the dealer will typically be more expensive than coverage you could purchase elsewhere.
If you already have auto insurance, contact your insurer to let them know you will be adding or replacing a car on the policy. If you don’t already have a policy, begin shopping around for one at least a week or two before shopping for your car.
You can give the insurer preliminary details about the car type in advance (if you have a good idea of what you’ll be purchasing) and/or call from the dealer when you make the purchase.