One modern neuroscientifically meaningful way to explain it is that there are areas of the brain, like Broca’s area, that are heavily involved in the production of thoughts. So we can say that the brain produces thoughts. Physiologically these thoughts can be explained as chainlike chemical reactions.
The way it appears to work is that there is a thought and then there is another thought, and the relationship between these two thoughts is that the second always follows the first. One thought forever following another one is another way to explain the process of thought production.
There are many patterns in which this takes place, for example make-believe. First there is a thought that says something about something, and then there is the second thought that believes it. One finds this simply by observing one’s cognitive flow.
All the other patterns are similar. There is a statement of some kind (stimuli), and then there is a commentary for that statement (response). Typically, the response then becomes a stimuli for more responses and the commentary goes on without end.
It is very important to understand that this process is decoupled from reason. Unless reason (syllogisms) is forcefully interjected into this process, thoughts are just stories. Made-up stories.
In fact, we can immediately observe this to be the case. For example, if I ask you to give “three numbers whose product is ten?” you can then observe a voice within your cognitive flow appearing, that either gives the answer, or adds some commentary.
The correct answer to this question is “There are infinitely many possible sets of three numbers where their product will total ten”. There is no other correct answer to the posed question. After having read that, you may have observed another voice that adds commentary to the wrong answer.
Asking this question to 100 people will produce answers such as 1, 2, and 5 as the answer. Not only thoughts are decoupled from any deliberate process of reason, but for the most part they are automatically and instantly produced without any deliberation at all.
Even when there seems to be deliberation — unless we have forcefully pushed everything through syllogisms — if we observe how that is produced, it is produced in the same way. In other words, it’s just more make-believe, just more nice sounding stories. Deliberation is just one of the types of commentary that appear within one’s cognitive flow as thoughts.
All of this can be summarised readily into a simple mind-training slogan: