In mantra meditation, you repeat either a particular sound or a short phrase, many times. This can be done either loud (chanting), or silently, in your mind, or in some combination of the two forms.
Sometimes, in many spiritual paths, its your guru or mentor who gives you a personal mantra according to your development and it's again the guru who can change it, when necessary. In fact, not all mantras work in the same way for everyone. If you are not following a specific spiritual path, you can choose one and try another one, if the previous mantra was not effective for you.
Using a mantra during meditation helps to eliminate arising thoughts and distractions, giving you a tool you may use also out of meditation, for instance when you are under stress for any reason. Depending on your belief systemmantras can help you to feel closer to nature and even to God.