Besides carbon dioxide and water as the main products of burning coal, there are a number of by-products of burning coal, such as different oxide of sulfur (usually SO₂, but much more), different oxide of nitrogen, and many heavy and toxic metals (such as mercury, arsenic, cadmium, lead).
Coal has more aromatic hydrocarbons that more aliphatic fuels and burning of aromatic hydrocarbons produces more soot that burning of aliphatic hydrocarbons.