When you try to pray and are continually distracted, cry out to God and ask him to shoo the distractions away.
When many people sit or kneel down to pray, their mind will be instantly filled with distractions. These are unrelated thoughts that often take us away from praying to God and turn our minds to something else.
Thomas Kempis, well-known for his spiritual classic The Imitation of Christ, wrote a brief prayer for such on occasion that places the burden on God to chase the distractions away. This can help relax our disposition and place our trust in God, who has the power to help us pray as we should.
5 Saints whose lives were changed by ‘The Imitation of Christ’
Here is the prayer he wrote, as found in The Imitation of Christ.
O my God, remove not thyself far from me, and depart not in thy wrath from thy servant. Dart forth thy lightning, and disperse [these distractions]; shoot thy arrows, and let all the phantoms of the enemy be put to flight. Gather my senses together to thee; make me forget all worldly things; give me the grace speedily to cast away and to despise all wicked imaginations. Come to my aid, O eternal truth, that no vanity may move me. Come, heavenly sweetness, and let all impurity fly before thy face. Pardon me also, and mercifully forgive me the times that I have thought of any thing else in prayer besides thee. For I confess truly that I am accustomed to be very much distracted; for oftentimes I am not there, where I am bodily standing or sitting, but am rather there where my thoughts carry me. There I am, where my thought is; and there, oftentimes, is my thought, where that is which I love. That thing most readily comes to my mind, which naturally delights me, or which, through custom, is pleasing to me.
Here is one simple solution to distractions during prayer