What happens if someone who is not on your insurance has an accident with your car?
Some aspects of the answer depend upon the state in which you live and the law to which it adheres. For example, in many states, the owner of the vehicle and the driver are jointly liable for the damages to the third party if the driver was using the car with the knowledge and consent of the owner. Generally, permission is presumed to exist in the absence of the car having been stolen or there being an express, provable, refusal to permit its use.
In general, if the car was insured for liability coverage and the driver was not listed on the policy as a permissible user, the insurer will likely disclaim coverage. This is because it was not paid a premium to assume the risk of his/her use of the car.
If the owner did have liability insurance on the car, and if the driver had liability insurance on a different car that he/she owned and normally drove, the law of the state in which the collision occurred would likely address who's insurance is "primary" and who's is "excess"; this essentially means which insurance pays first before the other may be called upon. Often, the driver's liability insurance is primary because he/she is the actively negligent party, while the owner bears only a vicarious liability.
Keep in mind that "what happens" also depends on fault. That is, the occurrence of a collision does not necessarily mean that anyone pays anything to anyone. In order to be entitled to damages, one party has to be found negligent (careless). Even the issuance of a traffic ticket for the collision is not determinative of the issue. A ticket is essentially the police officer's accusation that a traffic law was violated; it still has to proven. An adjudication of guilt on the ticket may have a bearing on a later finding of civil liability for damages.
If the matter proceeds to suit and a judgment is entered against the owner/driver, and the judgment remains unpaid for a statutory period of time (often 30 days), the person(s) against whom the judgment was/were entered are subject to having their licenses/registrations suspended based upon the state's Financial Responsibility Law.