"Your thoughts are completely in your power. You can turn them in any direction you want. Sometimes your thoughts may run wild and fly to areas from which you should keep away. Nevertheless, it is within your power to take your thoughts in hand, even against their will, and direct them to the true path.
Thought is like a horse that gallops off the road and tries to go in the wrong direction. The rider controls the horse with the bridle, forcing it to go in the right direction. As soon as you see your thoughts pulling in the wrong direction, take them in hand and bring them back in the right direction."
Rebbe Nachman of Breslov - Likutey Moharan II, 50