It is both. But that answer requires looking more deeply at the meanings of the words "theory" and "fact."
In everyday usage, "theory" often refers to a hunch or a speculation. When people say, "I have a theory about why that happened," they are often drawing a conclusion based on fragmentary or inconclusive evidence.
The formal scientific definition of theory is quite different from the everyday meaning of the word. It refers to a comprehensive explanation of some aspect of nature that is supported by a vast body of evidence.
Many scientific theories are so well-established that no new evidence is likely to alter them substantially. For example, no new evidence will demonstrate that the Earth does not orbit around the sun (heliocentric theory), or that living things are not made of cells (cell theory), that matter is not composed of atoms, or that the surface of the Earth is not divided into solid plates that have moved over geological timescales (the theory of plate tectonics). Like these other foundational scientific theories, the theory of evolution is supported by so many observations and confirming experiments that scientists are confident that the basic components of the theory will not be overturned by new evidence. However, like all scientific theories, the theory of evolution is subject to continuing refinement as new areas of science emerge or as new technologies enable observations and experiments that were not possible previously."