If someone hits you and the driver that hits you has no insurance then after a filing a police report you contact your auto insurance company and file an uninsured motorists claim.
That is if you have uninsured motorist coverage on your auto insurance policy which you pay extra for.
Your insurance company will then pay for any injuries you sustained and damages to your vehicle if you get hit by someone and they don't have auto insurance.
If you don't have uninsured motorist coverage then you'll need to sue the uninsured driver in court for damages to your vehicle and any injuries you've sustained.
That's why it's worth the extra cost to get uninsured motorist coverage in case you do get into an accident with someone who has no insurance and they're at fault in the accident.