Question: Is it sinful to be distracted at Mass or at other times of prayer?
Answer: The ability to be distracted is essential to human (or animal) survival. While the mind may try to concentrate on some primary task like prayer, it must be ever alert to changes in the environment that might require immediate action, like the smell of smoke or the cry of a baby. God made us in such a way that we can be aware of several things at once; distraction, even at prayer, is natural and sometimes beneficial; not sinful. If possible, we ought to minimize the distraction in our devotions by choosing the place and time of our prayers to have adequate ventilation, reasonable comfort, proper lighting, quietness, freedom from interruption, and so on.
We also must strive for discipline. That requires a conscious effort to return to our prayers quickly after determining that a distracting influence or thought can be put off until later. A well thought out daily routine can help; trying to compress all the prayers of the day into one overly long period of time may lead to boredom and should be avoided.
Our knowledge of holy things ought to be adequate for our prayer life. We should be familiar with the events of our salvation, particularly the lives of our Lord and Lady. It helps to understand what is taking place at Mass and to be able to follow the prayers in a missal or to meditate on the appropriate mysteries of the Rosary.
Unless purposefully brought about, distraction in prayer is not sinful. Overcoming distraction may, indeed, be a source of grace.