Both. Any respectable geologist will tell you that the long-term trend is global cooling, and that we are headed for another ice age in less than 10,000 years, which is accurate. Any respectable climatologist will tell you that the short-term trend is global warming, which is also accurate.
In the past the earth has been warmer than it is now, well-after the continents were formed but well before humans arrived. The earth's climate may be the single most complex system of which we know, and scientists who are not seeking grants or running for office will admit that we understand very little about it. As a comparison, humans have been building bridges for at least 6,000 years, but we understood so little about the simple environment in which a bridge exists that we were unable to prevent the recent collapse of the interstate bridge in Minneapolis. The earth's climate is at a minimum a billion billion billion billion times more complex than that bridge.
The debate about global warming has suffered tremendously because of politics. There is a likely connection between carbon in the atmosphere and global warming. Historically they have been connected. An "inconvenient truth" is that, in the past, the earth has first warmed and then the carbon increased. Human-caused carbon in the atmosphere affects the global climate. There is no proof that it alone DETERMINES global climate.
I am prepared to believe that carbon emissions are the issue, the only issue, and we must take drastic steps to reduce these emissions when we better understand how carbon levels interact with solar flares, volcanic activity, tectonic plate movements, and about 50,000 other influences. Many of the people concerned with global warming are trying to do just that. Unfortunately, they cannot be heard amidst the hysteria of "the scientific debate is over, we have complete knowledge and perfect understanding, only we are concerned about the earth, anybody who opposes our plan is fundamentally evil." No scientist would ever say the scientific debate is over - but politicians would.
At the age of 59, I recall that in the 1970s the intellectual forebears of today's Global Warming hysteria-mongers claimed complete knowledge and perfect understanding, proclaimed that only they were concerned about the earth, anybody who opposes our plan is fundamentally evil" and the topic was nuclear power. The drastic plan was to make it impossible to build new nuclear power plants in the U.S. because they were the great danger to the environment. Instead, we should build more coal-fired plants. The plan succeeded, and we built more coal-fired plants, and today's generation of "complete knowledge/perfect understanding" enthusiasts would have us believe that only evil people ever wanted to build coal-fired plants. In about 30 years I expect my children to hear from a new crowd that the bezulium tetrascudate crisis was caused by the evil people who reduced carbon emissions, that only the bezulium tetrascudate crisis hysteria mongers care about the earth, etc, etc, etc. Had we continued building nuclear power plants for the past 30 years we might actually be EXPORTING oil today. So much for complete knowledge and perfect understanding.
So, the answer is that it is both warming and cooling. No one understands why. Carbon emissions may play a part in the current warming trend. We should do our best to model the complex system of the earth's climate and not let hysteria-mongers, insufferably self-righteous egoists, or former politicians, obscure a search for the truth with their noise. If it turns out that carbon emissions are the primary determinant of the course of our climate, the primary obstacle to discovering this is the noise put out by deep thinkers such as Martin Sheen, Sean Penn, Al Gore and whichever Baldwin brother is currently out of rehab. I'm prepared to believe and have no stake in the answer.