Scientists measure three things over time: the amount of fossil fuel people burn, the concentration of carbon dioxide in the atmosphere, and the average global temperature. Since the Industrial Revolution, fossil fuel consumption has increased, atmospheric carbon dioxide concentration has risen, and average global temperature has also risen.
When two sets of data change together like this, we say there is a correlation. A correlation is good evidence, but it does not prove that one thing causes the other. It becomes stronger evidence when there is a scientific explanation, here that carbon dioxide absorbs heat radiated from the Earth, and when the pattern appears in many independent data sets.
There are uncertainties. The location where a measurement is taken matters: carbon dioxide measured beside a city or a volcano may differ from the global average, and temperature readings from only a few places may not represent the whole Earth. Historical accuracy is also a problem. Before modern instruments, scientists rely on indirect evidence such as ice cores and tree rings, so older data is less accurate. A good evaluation weighs the strength of the correlation against these uncertainties.