Global warming is caused primarily by an increased greenhouse effect, or the proclivity of certain gases in the atmosphere to allow sunlight to enter but not to depart. Although the Earth has natural periods of warmer and cooler temperatures overall, global warming is exacerbated by gases produced by heavy industry.
Carbon dioxide, or CO2, is the primary culprit in creating the greenhouse effect, because it has increased exponentially since humans began heavy manufacturing, which releases CO2 as a byproduct. An example of this heavy manufacturing is the production of cement from limestone. Methane from farm animals and nitrous oxide are also responsible. Rapid deforestation for industry reduces the number of plants and trees that would otherwise be drawing carbon dioxide out of the air and replacing it with oxygen via photosynthesis.
The greenhouse effect is a natural property of the atmosphere; life as it is commonly known could not exist if the atmosphere didn't trap some of the heat from the sun and act as an insulator. The greenhouse effect works because of the presence of some gases whose molecules are loosely bound enough to trap heat, release it as radiation, and thereby heat up the atmosphere and the ground more than would otherwise occur.