pain is always generated by your brain. certain neurons are firing in a certain pattern which makes you feel "pain" of this sort in this part of your body. most of the time the brain does this to alert you of an injury in the body so you no longer use this body part and give it a chance to heal. if an injury has been around for some time - longer than a few days, let's say the injury and thus the pain has been around for weeks or even month, the brain has learned that this "pain pattern" of neuronal activation is the new normal. there is no set "normal" for the human body. the body and especially our brains always adapt to current situarions. they evaluate these situations by using the patterns that they have been using for some time and of which they think as "normal" because these are the pattern the brain is used to at the moment. it even molds in a plastic way into these activation patterns, neuronal connections which are used often (f.e. because you are experiencing pain in the injured body part") get stronger just like a muscle you are training every day. basically this is how we remember anything at all, memories are certain activation patterns and if you are using them more often (train more often a certain move, repeat every day the new vocabulary you wish to commit to memory, practice makes perfect) they get stronger every time.
problem is, pain works the same way. the brain has activated the pain pattern connected with this injury so many time over the last few month it continues to do so even if the injury is already healed. it does this now even without being prompted by the injured body part that it is injured and therefore now hurts. feeling this pain just became the new normal for the brain. it takes a lot of time to overcome this "pain memory". mostly you get over it by working through the pain, accepting it, not avoiding it, once you are cleared by the doc. the brain has to learn that there is no pain anymore, that all is fine. this is tricky and can lead to reinjury, especially with young children who are to young to understand the process.
the pain experience is therefore very, very real even if the injury itself is no longer there. pain is pain, the neuronal patter in the brain is the same no matter if the pattern got activated because of a still exitisting injury or because it is just the new normal, the memory of the pain from the injury. this is not fear or anything like this. it is probably just the brain being itself. it needs time to adapt to a new normal far away from the old pain pattern it got used to over the last few month.