It will be up to the person or dealership selling the car and the state's law and registration requirements to determine if you can buy a car without a social security number.
Even if you do find a car dealership or private party from which you can purchase a car from without a social security number, you should still check with the Department of Motor Vehicles in the state which you plan to register it to make certain you can do so without the SSN.
You can buy insurance without a social security number however insurance companies will require you to have a US driver's license which depending upon state laws of the state in which you reside in, you may be required to have a SSN in order to obtain a license.
You can start here to get a quote for car insurance online.