A pain, a belief, and a desire are different kinds of mental state, and this question asks what makes a state the kind it is. One answer looks to what the state is made of: pain is a particular kind of brain process. The other looks to what the state does: pain is whatever state is caused by injury and in turn causes distress and wincing, whatever it is made of. The two answers come apart for creatures built differently from us, such as an octopus, or a machine that might one day behave as if in pain.
This question differs from The Mind–Body Problem, which asks whether the mind is immaterial or entirely physical. An answer here need not settle that one: in principle, a causal role could be played by something non-physical.