What part of the brain gets affected and does it harm the brain? Thank you I just needed some extra info for a video I'm making.
We don't know. Disruption of cortex, thalamus, or brainstem structures (someone mentioned ascending reticular activation system) all can cause loss of consciousness. Different drugs have different mechanisms of action and some might cause different "types" of loss of consciousness - for example, ketamine and propofol seem very different, and trauma is a completely different issue.
The reason this is such a hard problem is that these structures are all interconnected, and there are likely proximate and distal causes of loss of consciousness. For an analogy, imagine you starve to death. You could make a convincing case that lack of food did it - so conclude food keeps you alive. But you weren't declared dead when you stopped eating; you were probably declared dead when your heart stopped. So conclude your heart keeps you alive. But in the middle somewhere, you had changes in ion concentrations in your blood, loss of glucose. So salts and sugars keep you alive. I can prove these are all true - take out your heart, you die. Stop feeding you, you die. Fill your arteries with KCl, you die.