Why does a loving God permit pain?

Soul Seeing: My devout Catholic mother confidently advises prayer and reflection as a means of clarity. It took me a long time to realize what that means.