When you put oil in a car, it is pumped around and sprayed inside the engine to reduce the friction of engine parts rubbing and rolling against other parts.
If you really want to feel this answer, press the palms of your hands together hard and rub them together really fast. Feel the heat begin? That's friction. Just like what happens when cylinders in a car engine move up and down inside the block.
Now go to the kitchen and put a drop of cooking oil on one of your palms and rub them together again. What do you feel?
Easier rubbing and less heat? Do you understand how that relates to a car engine?
Oil coming up out of the earth is a lubricant, just like the motor oil that is in the car. There would not be much friction between the oil and the pipe.
Now the deeper you go into the earth, the warmer it is. Why is another question. So oil pumped up is warm. That cools, but it really does not have any measurable effect on the earth's atmosphere because there is so little fresh oil compared to the mass of the air around the earth.
Does removing warm oil cool the earth down deep? No, because nothing cooler is being put back. The rocks below stay the same temperature.
The effect of oil on global warming comes when the fuels made from that oil is burned. Then carbon and hydrogen in the oil combine with oxygen in the air to make water and carbon dioxide.
The carbon dioxide (CO2) is the problem. When light comes in from the sun, it goes right through the CO2 in the air. When the light strikes the something in the air, the light is either reflected away or its energy is absorbed (yes, light has and is a form of energy). The energy in the light is transferred to whatever absorbs it. Just like the sun warms you.
Warm objects sooner or later radiate their heat away again. But those photons of energy that leave are not as energetic as the light energy photos coming in. They go out with less energy, and we call those photons of energy "heat. " We can feel that energy too.
Heat energy zips right through the oxygen and the nitrogen in the air, and the loss of heat allows the earth to remain cool enough for us to live on.
But CO2 does not let heat out so fast. The CO2 absorbs the heat energy and holds it for a while. It acts like your blanket on your bed on a cool night. It traps the heat in the air around us. We get warmer and stay warm because of the insulating effect of the blanket on the bed, and the earth stays warmer because of the insulating effect of the CO2 in the air around it.
Does burning the oil itself heat the earth directly? Yes, but that heat radiates away just like the absorbed heat from the sun. But those molecules of CO2 in the air hang around for a long time and as long as they are there, they work constantly at keeping heat from any source in the atmosphere and warming the earth.
Back to your car. The engine produces a lot of heat from the burning of the gasoline or diesel fuel. If you don't get rid of it, the engine burns up or seizes. That also happens because of heat from friction if you let the oil out and run it for too long afterward.
How does an engine get rid of heat? Engine heat is carried away by water pumped through the radiator where the heat is radiated into cooler air passing through. If you block the flow of air through the radiator, what happens? Does that little read light that says "Engine Overheat" on your dash come on?
You could think of scientists who study our atmosphere and global warming, and people like Al Gore, as red lights on our dashboard. Do the people whom you know pay attention to those warning lights while they drive around town? Should they?