A Mantra is meant for repetition during sitting-silent meditation [if recited aloud, there is no difference except that the environs can benefit too].
The mantra is a tool for focusing the minds wandering tendency.
The practice of mantra usage is aprt and parcel of 'devotionals' ---not attempts at magic.
If the meaning of each word of each mantra were known as well as one's native tongue, then it would be clear WHY to repeat a mantra.
Practice yoga & meditation ... and naturally one will have a mantra to recite as part of the "meditation" discipline.
By recitation of a mantra:
1 - The mind stops "jumping from thought-to-thought" [this takes repeated practice]---and thus, the mind becomes 'mind-full' while being 'without any particular though-in-mind' ---when the above yogic practice is near-perfected, this state becomes a state of conscious awareness without focusing on any thoughts: non-thought-filled awarness [aka, being in the zone]. The sense of being an individual conscious soul is all that is left whenever the mantra stops being repeated . . . then the mind's thoghts & the body's stimulai kick back in ---and one returns to the hustle & bustle state of regular walking/talking/work life. The empty state of no-thoughts while being fully aware and thus, temporarily without desires [ergo, thoughts] is a blissfull state. Why? Because it is without anxiety regarding loss and distress or gain or impositions of any kind.
This state that is attained through practiced sitting meditation is a means to know Brahman-Realisation. The Soul is made of Brahman (consciousness) and when the Mind stops pre-occuping itself with thinking about desires and plans et al ---it can sense itself.
2 - After "Brahman"-Realisation is steady in it's understanding and ramifications (ie: A sample of Brahman selected from any place and time and distance is NO different from any other sampling; IOW Brahman is absolute in all regards.) So, since the soul is a part and parcel of brahman ---each soul in You & I & all Creatures is the same brahman ---except that each point of light (an individual soul) is indivisable and each soul is its own insoluble POV. Each soul is an individual entities all onto its own; each soul is part and parcel of Param-atma, the Supreme Soul. God the personage is the Supreme Soul with a name fame form personality paraphenalia entourage and pastimes in a place Eternal transcendental (no influence of passing time, ie: Creation/maintainance/dissolution) to the material manifest cosmos the we souls in this material world see and enjoy during each life time as time goes by.
3 - After the above is understood 'as absolute' and that all lessons are learnt by disciplic chain of succession, we engage in the lessons taught by Krishna in the Bhagavad-gita. That even in the most ghastly circumstances, perform your duty and seek no reward beyond your lot in life as a means of transcending the mundane world ---as a devotional penence to The Supreme Personality of Godhead, from whom all personality arises to engage the souls in pastimes ... either in timeless heaven or in the temporal material world of repeated births and death.
the maha-mantra:
hare krishna hare krishna
krishna krishna hare hare
hare rama hare rama
rama rama hare hare