Plain version: insurance moves a possible loss off one person's shoulders and spreads it across many people. Picture 1,000 people each chipping in, agreeing that whoever is hurt or falls ill gets their medical bills paid from the pool. Each person's share is the premium.
California's legal definition (Ins. Code §22): insurance is a contract whereby one undertakes to indemnify another against loss, damage, or liability arising from a contingent or unknown event.
Contingent means it may or may not happen. A future accident or illness qualifies; a surgery bill already in hand does not.
The insurer promises to pay for the loss, not to prevent it.
The definition names liability too, and it is not limited to one line of insurance.
Know the roles:
Insurer: the one who undertakes to indemnify, that is, the insurance company (§23). It is the agent's principal.
Insured: the one indemnified (§23). In health and disability insurance, it is the person whose health or income is covered.
Applicant / policyowner: the applicant fills out and signs the application; the policyowner pays for and controls the policy. They are often the insured, but do not have to be.
Agent: represents the insurer.