The Stanford Encyclopedia of Philosophy defines a thought experiment as “devices of the imagination used to investigate the nature of things” in a variety of fields, which are most often performed to aid in conceptual understanding, to illustrate/clarify highly convoluted situations, or to fulfill a specific function of a theory.
In layman’s terms, that means considering a concept, notion, or premise to evaluate the consequences of an action, though it may not be feasible or prudent to carry it out in the first place.
Schrödinger's cat might be the most famous example of a thought experiment, in which a cat, poisonous flask, and radioactive material are placed in a sealed box.