Thought experiments are exercises in using various epistemic sources such as memory or perception creatively through conscious and subconscious processes to create permutations, in this context, of theories to reason intuitionally and defeasibly about topics and allow for empirical confirmation.
If we take thought to be the conscious and subconscious processes of the brain, that is the phenomenological and those of Searle's Background, one can think in such a way that one can take a whole range of abilities, from language to visualization to muscle memory to emotion and experience various permutations of them somewhat intentionally. As an example, Albert Einstein's riding a light beam visualized his experience physically traveling and paired it up with facts about the transmission of light. Note, that one cannot actually ride a light beam, so by visualizing the fictional, it led him to scenarios that were creative. What happens when you turn on a flashlight riding the light beam, etc. This is an activity psychologists call free association.
What is the relevance of free association to thought experiments? The Gedankspiel ultimately brings to bear the power of the Background or the unconscious mind to bear in a creative act of producing novel thoughts. This is particularly productive in the philosophical method, because it introduces novel permutations of definitions, relations, predications, so on, and from that better arguments. Despite the philosopher's preoccupation with deductive and inductive logic, far closer to the act of intuition and more in line with everyday habits of thinking, abduction and defeasible reasoning dominate creative thinking.
Take for instance the methodology of the legal community. It includes the activity of case-based reasoning particularly in systems of law, like English common law that recognizes the importance of and practice stare decisis. A single fact can upend an entire legal theory, so the best argument isn't a product of deductive or inductive thinking, but more commonly calls for reasoning to the most likely explanation or having insights into how two seemingly disparate cases have a commonality. The same applies in the diagnostic techniques of the medical model. Given the complexity of the body and the number of processes that can generate similar symptoms, the differential diagnosis is a fine art influenced by heuristics rather than an algorithmic process generally speaking. In the US, the TV show House was essentially episode after episode of thought problems where the standard prognostications failed, and insight into the exotic pathology in question was triggered by anything but looking at a medical textbook or relying on titers. For science, often the innovation from a thought problem comes from escaping pardigmatic thinking leading to a radical realignment of scientific theory.
In regards to corresponding to reality, it's the standard notion of empirical confirmation of the theory. In the general and special relativity, once Einstein had an intuitive notion that space-time was not to be conceptualized as a volume, but rather as a field, then came the mathematics and the measuring of light moving around stars to confirm the hunch. This is perhaps one of the most famous examples of creating a paradigm shift and watching one theory (relativistic physics) subsume another (Netwonian physics).