According to BigThink, a publication focused on education, what consciousness is and where it comes from has absorbed great minds for thousands of years. In today's world, it's a question posed by physicists, cognitive scientists, and neuroscientists. There are a few prevailing theories.
The first is known as materialism. This is the idea that consciousness emanates from matter. In the case of people, by the firing of neurons inside the brain. If you take the brain out of the equation, then consciousness doesn't exist at all.
The second theory is mind-body dualism. This is perhaps more often recognized in religion. Here, consciousness is separate from matter. It is a part of another aspect of the individual, which in religious terms we might call the soul.
The third option, which is gaining ground in some scientific circles, is called panpsychism. In this view, everything material, however small, has an element of individual consciousness. A handful of scientists are starting to embrace this theory. Aspects of Shinto, Buddhist and Hindu religions also support panpsychism. But, it's still a matter of great debate.
In popular culture, Marie Kondo embraces a kind of panpsychism. For instance when faced with a pile of old books, she will take each one and slap it to "wake it up."