Liability insurance is a very broad superset that covers legal claims against the insured. Many types of insurance include an aspect of liability coverage. For example, a homeowner's insurance policy will normally include liability coverage which protects the insured in the event of a claim brought by someone who slips and falls on the property; automobile insurance also includes an aspect of liability insurance that indemnifies against the harm that a crashing car can cause to others' lives, health, or property. The protection offered by a liability insurance policy is twofold: a legal defense in the event of a lawsuit commenced against the policyholder and indemnification (payment on behalf of the insured) with respect to a settlement or court verdict. Liability policies typically cover only the negligence of the insured, and will not apply to results of wilful or intentional acts by the insured.
Comprehensive car insurance covers damages from an "act of God," or events that are not caused by a car driving into something else. An "act of God" can include things like damage from a heavy tree branch falling on your car. Since you have no control over when or why a tree branch would fall on your car, this kind of accident would be covered under your comprehensive policy.
The main difference between collision and comprehensive coverage comes down to the question of what the driver controls. Collision insurance will cover events within a motorist's control or when another vehicle collides with your car. Comprehensive coverage generally falls under "acts of God or nature," or things that are typically out of your control when driving. These can include events such as a spooked deer, a heavy hailstorm, or a carjacking.