If you have a car insurance policy, and sell the car, just notify the insurance company, and they will cancel your policy and refund the unused portion of the premium, usually minus a few bucks for the paper work.
After you sell your car, call your insurance agent and cancel your policy (or change it over to your new car). If you cancel, you will probably get a refund of part of the cost. If you transfer to a different vehicle you'll only have to pay the difference.