There is that which is (and is not) and that which we know about that which is (and is not); i.e. there is ontology and epistemology. There are both and not only one.
To say that our thoughts are all that is, is Idealism, the first error. To say that we have no thoughts but things themselves only exist is Materialism, the second error. There are, of course, innumerable ways for human thinking to go wrong; I only mean these two errors, Idealism and Materialism, are the drivers of many or most of them.
Idealism says reality doesn’t exist per se as something outside our thoughts, or perhaps outside the thought of some superior being, perhaps God, perhaps a powerful (computerized, these days) demon. Idealism in its strongest and most erroneous form does not just assert that we can only know our own thoughts, or that we can’t know things are they are in themselves, but it says that our thoughts are it. The universe—by which here and everywhere I mean all there is—is only thought and utterly immaterial.
As we learned before, Idealism was The Consensus in philosophy in the Victorian era. Only deniers denied Idealism. As David Stove taught us:
In 1887 almost every philosopher in the English-speaking countries was an idealist. A hundred years later in the same countries, almost all philosophers have forgotten this fact; and when, as occasionally happens, they are reminded of it, they find it almost impossible to believe. But it ought never to be forgotten. For it shows what the opinions, even the virtually unanimous opinions, of philosophers are worth, when they conflict with common sense.
It is perhaps not surprising Materialism came on the heels of Idealism supplanting it as an overreaction in the opposite direction. It is also thus understandable that both errors waxed and waned over the centuries. Materialism is the idea that all that exists is matter, or rather matter-energy, or just plain energy since the two are equivalent in some sense. The universe is nothing but interacting “particles” or clashing fields of energy. Even our thoughts can be reduced to mere arrangements of matter and energy. We don’t exist formally, neither do our thoughts exist independent of matter.
Funnily enough, Idealists say matter is an illusion and Materialists say thought is an illusion. Both sides accuse the other of being figments of their imaginations, so to speak. The Idealists are one up on the Materialists with their rhetoric, though. If Materialism is true, there cannot be illusions. Illusions can only be had in non-material thoughts. Why? In order for there to be illusions, there must be an underlying Reality which is being mistook, and there must be an individual doing the mistaking. Material itself, i.e. arrangements of matter or energy, cannot be wrong, in error, or mistaken, deluded. To say, under Materialism, that there are illusions is to say matter is wrong about itself, which is absurd.
These errors have ties to physics, too. To say only “particles”, or whatever it is that is prime matter, say, strings, or only energy exists is Materialism. To say only there are only fields or “laws” of physics, i.e. forms, is Idealism. Together there is form and matter (or energy). Energy or matter must take a shape, and that shape is a form. Thus that form has to originate from something. It can and must exist as an idea and is not itself material. The marriage of form and matter in physics, and in ordinary philosophy, is called Realism.
Think of it this way. If all that existed was formless energy, or disorganized prime matter, and there were no forms then nothing could happen, no change could get started. And if all that existed were forms, then no interactions could take place, and again nothing could happen. Given what we see, it thus can’t be that energy or matter can exist without forms. Physics, then, is the search for the fundamental forms and the prime-est matter, if you like.
Physics hamstrings itself if it doesn’t consider these metaphysical ideas. Scientists do well enough with matter and energy, and they do understand that these must be wedded to form, without perhaps thinking of it in this way. But they are not so used to thinking about the immaterial nature of the forms, which is why physicists (in which I include computer scientists et al.) slide into Materialism, which is close to the consensus view today.