When you sell your car, you must cancel your insurance policy. If you do not cancel your insurance policy, you will still be responsible for paying the premiums. If you get into an accident while driving a car that is not insured, you will be personally responsible for any damages.
In order to be covered by insurance, you must be listed as a named insured on the policy. This means that your name must appear on the policy declaration page. If your name is not on the policy, you are not covered, even if you are driving the car with the permission of the owner.
If you are not sure whether or not your name is on the insurance policy for the car you are driving, you can contact your insurance company. They will be able to tell you if you are covered.