If the heart wanders or is distracted, bring it back to the point quite gently -- and even if you do nothing during the whole of your prayer but bring your heart back, though it went away every time you brought it back, your time would be very well employed.
The heart always has an object of love; it is always attracted to some sign of beauty. Whatever the heart holds its attention on, it will acquire its qualities. Rumi said, "If your thought is a rose, you are rose garden. If your thought is a thorn, you are kindling for the stove." Being between the attraction of the physical world and the ego, on the one hand, and spirit and its qualities on the other, the heart is pulled from different sides. But ultimately behind all these various attractions lies one great Attractor.