One of the major harmful things your car produces as it consumes gasoline has to do with smog and ozone in the cities and the problem has to do with carbon and greenhouse gases.
When a car burns gasoline, it produces carbon monoxide it is a poisonous gas, Nitrogen oxides it is the main source of smog, and the unburned hydrocarbons the source of urban ozone.