We know that humans are the major cause of global warming in two ways. First, calculations show that natural factors alone come nowhere near explaining the observed warming over the last 150 years. Second, direct chemical evidence in the atmosphere shows that the majority of the carbon dioxide that has been building up in the atmosphere comes from fossil fuel combustion.
Image above: A piece of coal being held in front of a coal-fired power plant in the Netherlands. Photograph by "Adrem68" (Wikimedia Commons; Creative Commons Attribution-Share Alike 4.0 International license).
Carbon emissions from human activity and concentrations of CO₂ and other greenhouse gases in the atmosphere have risen dramatically since the industrial revolution began in the early 1800s. Earth’s average temperature has been rising in a way that cannot be accounted for by natural variation alone. Climate models that incorporate increasing CO₂ from human activities explain this warming trend better than any models based on only natural variation. For an example of a model that separates out and quantifies natural and human factors, see the video below: “What is Causing the Earth to Warm?”