According to various brain imaging studies, mindfulness meditation can change the brain in ways consistent with observed or self-reported improvements in concentration, memory, and mood.  The same has been found with prayer, cognitive behavioral therapy and psychodynamic therapy. Do these practices/interventions share common features that produce similar neurophysiological effects, such as in brain structure, neural activation patterns, or neurotransmitter production? I’m guessing the following elements play a role:

Repetition: if you repeat a behavior enough, it becomes easier because the neural circuitry underlying that behavior has been strengthened.

Top-down Control Practice: the more often you exercise self-control to inhibit certain behaviors (including cognitive behaviors), the better you get at nipping them in the bud - reflecting more efficient inhibitory processing in the brain.

Attention Redirection: cultivating the discipline of goal-directed focus requires ongoing attention redirection, which engages and strengthens the attentional control networks in the brain.

Skill Acquisition: skills are changes in perceptual, cognitive or motor performance as the result of training and practice; you don't acquire a skill without changing the brain. 

Emotional Regulation: altering arousal, stress response, and emotional experience via various techniques and strategies; implicates cortical and subcortical neural connectivity and neurotransmitter production.

Associative Learning: learning to initiate skilled behaviors in certain situations, quickly and with little fuss; skilled behaviors include attentional redirection and emotional regulation, reflecting patterns of neural activation and inhibition that have become strengthened through practice and repetition.

So much for what mindfulness meditation, prayer, cognitive behavioral therapy, and psychodynamic therapy have in common. Where they differ is in their narratives about how the world works and how they do their magic. Narratives may contribute to the effects described above insofar as they are plausible and motivate the associative learning of useful skills.

References:

Beauregard, M. (2014). Functional neuroimaging studies of the effects of psychotherapy. Dialogues in Clinical Neuroscience, 16(1), 75–81.

Davidson, R. J., & McEwen, B. S. (2012). Social influences on neuroplasticity: Stress and interventions to promote well-being. Nature Neuroscience, 15(5), 689–695. http://doi.org/10.1038/nn.3093

Galanter, M. et al (2017) An initial fMRI study on neural correlates of prayer in members of Alcoholics Anonymous, The American Journal of Drug and Alcohol Abuse, 43:1, 44-54, DOI: 10.3109/00952990.2016.1141912  http://dx.doi.org/10.3109/00952990.2016.1141912

Green, C. S., & Bavelier, D. (2008). Exercising Your Brain: A Review of Human Brain Plasticity and Training-Induced Learning. Psychology and Aging, 23(4), 692–701. http://doi.org/10.1037/a0014345

Newberg, Andrew (2010). Principles of Neurotheology. Farnham, Surrey, England: Ashgate Publishing. ISBN 978-1-4094-0810-9.