A mantra is basically a means of talking with your thoughts and feelings. It's a time-honored method sometimes referred to as prayer, but really it's an opening of a conversation between the heart and the mind.
Tsoknyi Rinpoche (2012). “Open Heart, Open Mind: A Guide to Inner Transformation”, p.11, Random House