How to chant with attention
Our first reaction upon reading your question was "only sometimes?"
Even Arjuna says that the mind is more difficult to control than the raging wind; so it shouldn't surprise you when the mind wanders. This is common. Krishna says the mind can be controlled by constant practice, detachment and determination. So be patient and keep trying.
Some things that can help control the wandering mind:
- Chant in the early morning. When the material world is sleeping and the mode of goodness prevails it's easier to chant attentively. About an hour and a half before sunrise is best, but whatever you can arrange so that you chant as many rounds before the world starts tugging on you via phone and email, etc. the better.
- Don't eat a lot in the evening. Make sure that before you take rest your mind is thinking of Krishna by reading something about Him, and that your body will sleep well—but not too heavily—by avoiding heavy food before bed.
- Read about the glories of the holy name and listen to classes about
them as well. There are many recordings of japa retreats on ISKCONdesiretree.com which can help you deepen your appreciation for chanting.
- Pray before you begin your chanting. Pray to the holy name, to your
spiritual master, and to the Lord to assist you in this service and help you to fix your mind.
- Chant clearly. Pronounce each word distinctly enough for yourself to hear it. Make sure you get sufficient rest so you're not tired when you begin to chant and that the place where you are chanting is well-ventilated.
- If you find yourself getting drowsy, stand up or pace back and forth. Go for a walk outside if you need to, but try to go somewhere where you won't be disturbed by others and you won't be distracted by scenery, etc.
Start with these suggestions and see if they help.