The word “theory” means a number of different things, depending on the context. In the maths and sciences, for example, it is a tested and testable concept that is used to explain an occurrence. For students of the arts, the term refers to the non-practical aspect of their work, while laypeople refer to unproven ideas and speculation as theories. The multitude of meanings for this word can get confusing, but the intent is usually clear from the context; a mathematical paper talking about a theory, for example, is probably referring to it in the scientific sense.
In English, the word dates back to 1592, when it was used to mean a concept or scheme. By the 1630s, scientists had co-opted the term, using it to describe an explanation or thought that was based on observation and testing. “To theorize” also emerged at around the same time.
In the sciences, theories are created after observation and testing. They are designed to rationally and clearly explain a phenomenon. For example, Isaac Newton came up with a theory about gravity in the 17th century, and it proved to be both testable and correct. Scientific theories are not quite the same thing as facts, but they are often very similar; scientists usually test their theories extensively before airing them, looking for obvious problems which could cause them to be challenged.
In mathematics, theories are bodies of knowledge about specific types of mathematics. Mathematicians use things like set theory in the course of their work. Theoretical mathematics can get quite complex and abstract, making it sometimes difficult for laypeople to understand, but it helps to explain everything from the movement of crowds to the origins of the universe.
In the arts, many artists refer to their non-practical work as theoretical. For example, a musician who plays the tuba would use the term to refer to the study of music history, the math of music, and other related material. Art criticism is also a field of theory, since critics discuss artwork, rather than actively producing it, and through their discussions, they contribute to the overall field.
For laypeople, a theory is simply an idea. Some people use the word like they would “hypothesis,” positing an idea that needs to be tested. At other times, an idea may be dismissed as “just a theory,” with the implication that it cannot be proven and it is only a rough idea, not a firm fact or opinion.