How does Mantra meditation work?

Mantras are rather mysterious. They are said to be "sound symbols" - sounds that in some way correspond to and evoke the spiritual forces that can be represented in visual form as Tara, Avalokiteshvara, etc. We can easily see how an image of a particular figure can have symbolic value, but quite how a sound does this it is not possible to explain rationally. Perhaps it's best to think of mantras as being a cross between poetry and magical incantations.
Many mantras don't make any real, rational, sense, even in Sanskrit, and so they can't really be translated in the same way that a normal sentence can. The mantra of Tara, for example - Om tare tuttare ture svaha - is a play on her name, which means "savioress" or "star" or "she who ferries across." But it doesn't make any kind of statement about Tara, beyond giving us some rather evocative sounds.
Mantras often contain syllables like Om, Ah, and Hum (approximately pronounced hoong), which have no literal meaning whatsoever. There are various "understandings" or interpretations of what these might mean, and the three syllables have been correlated with (respectively) body, speech, and mind; or (again respectively) the Dharmakaya, Sambhogakaya, and Nirmanakaya. They are also correlated with the Buddhas of the mandala, with Om being the seed syllable of Vairochana, the central Buddha, Ah with Amoghasiddhi, the northern Buddha, and Hum with Akshobya, the Buddha of the east. These kinds of associations can become important as we become familiar with Buddhism.
Some words in mantras give rise to more definite associations. The "mani" in the Avalokiteshvara mantra (Om mani padme hum) means "jewel," while "padme" means "lotus". The mantra is sometimes taken to mean "Hail to the Jewel in the Lotus" although the grammar is rather obscure. I see the mantra as being more poetic and symbolic. The jewel is symbolic of the clarity of wisdom, while the lotus is a symbol both of purity and compassion. So the Avalokitesvara mantra brings together wisdom and compassion. In reciting the mantra, one is calling those qualities to mind.
But trying to understand mantras intellectually is probably a bit like deconstructing a joke - you can do it, but by the time you have finished the task you've completely lost the point of the joke in the first place. Some people hold that mantras have an inherent "spiritual meaning" - that is that someone chanting the mantra of Avalokiteshvara will develop a connection with the compassion of Avalokiteshvara, even without knowing anything of the meaning (inasmuch as there is one) of the mantra, and without knowing anything about the bodhisattva himself. Others hold that the one develops associations with the mantra as one chants it and begins to learn more about the bodhisattva. Certainly, it is possible to benefit from a mantra while knowing nothing about it.
As an object of concentration - like any other -- a mantra can help to still the mind. While you are reciting a mantra out loud or internally, there tends to be less mental chatter. Even if there is a parallel stream of internal discourse going on at the same time as the mantra, the chanting creates more of a sense of continuity, which will grow with practice. The word Mantra is said to mean "that which protects the mind."