No one wants to park their car underneath the intense heat of the summer sun, and often a tree is the most convenient place to find shade. The problem is trees produce sap, which can drop onto your car's finish and leave stains.
Sometimes you'll discover that just a simple wash isn't enough to get rid of them. Some sap, like that of pine trees, hardens like resin and etches itself into the clear coat and paint, ruining your car's finish.
The best solution is prevention. Protect your car's finish by making sure it always has a fresh coat of wax. Car paint finish is porous and will allow contaminants to seep in. A fresh coat of wax lasts a couple of months, depending on its exposure to the elements, how often you wash the car, and what kind of soap you use.
Another way to protect your car's finish is to apply a sealer on it. Aside from wax, there are new products like ceramic coatings, which seal the paint finish from contamination. Ceramic coatings can last much longer, but they do need to be stripped off before it can be reapplied when it wears out. Waxes and sealers will just let tree sap or any staining contaminants slip off the finish when the car's washed.
The next most important thing to do is to not allow tree sap or stains to dry up and get baked onto the car's finish under the sun. Try to wash off the tree sap or contamination immediately before this happens, because once it does, it will permanently damage your car's finish. The only solution will be to sand it down, repaint, and refinish the spot or entire panel.
If the sap or contaminant has dried up and water can't wash it off, the first thing you should do is soak the affected area with denatured alcohol or isopropyl alcohol to soften it up. Try to rub it off with a clean rag afterwards.
The next step is to clay bar. If the contaminant hasn't set in that badly yet, the clay bar can latch on to it and wipe it off with repeated passes. The sap/contaminant will adhere to the clay and you'll need to throw the clay bar away. Don't re-use a contaminated clay bar as it will be an abrasive on your car's finish. This clay bar process can be easy or hard depending on how baked the sap or contaminant has become.
If the alcohol and clay bar don't work, you'll need to get more aggressive by using a cleaner/wax. Apply it onto the stained spot and rub it off.
If that doesn't do the trick, go up to the next level and try a polishing or rubbing compound--first by hand, and then next with a buffer and an aggressive pad that can cut through the dried sap/contaminant. However, with this method you'll also be taking off a layer of the clear coat or paint. This is the absolute last resort and, if it doesn't work, it means the contaminant has permanently etched itself onto your car's finish and you'll have to repaint or refinish the spot to cover up the damage.
The cleaner solvents that you used to try and remove the sap will most likely strip away the protection of your car's finish. You'll need to wash, wax, and re-seal the areas where you used them.