Japa is repetition of mantra. Mantra (=man +tra) means liberating the mind. There are hidden powers in the human mind. These powers are located in Chakras that are present in seed form in every human mind. Mantra when energised by a competent spiritual Guru can activate these Chakras through some kind of resonance effect and hence liberate these hidden powers. Of course given the state of one's mind mantra may need to be repeated millions of times to get the full effect. A small part of any mantra is called bija or seed. The bija mantra varies with the Devata being asked to help liberate the mind. It is not necessary to know the meaning of the mantra to use the resonance effect. Of course it would be nice to know the meaning. Basically a mantra works by bringing the aspirant closer to God.
Among the Vedic sacred formulas, the Gayatri has been prescribed for
repetition from ancient times. The Vedic people had great faith in the
efficacy of mantras. The Mimamsakas considered mantras to be the
embodiments of deities. In fact, they accepted no deities other than
the mantras at all. To them Brahman is nothing but sound (shabda), and
sound produces form. Thus, the name embodied in the mantra is more
real than the form of the deity.
Forms are made up of nothing but
fine vibrations, and vibrations are produced by sound only, so these
ancient conceptions are tenable. From another point of view, a mantra
gains spiritual potency through many years of being associated with
holy men who have repeated it and attained realization through it. The
concept of the mantra is based on the psychological fact that much of
our thinking depends on auditory symbols. Repetition of the mantra
creates a chain of thought which induces the mind with the thought of
God, and this is the aim of all spiritual practices.
Every Vedic mantra has a rishi who first intuited it, a particular
metre in which it is composed, and a deity to whom it is addressed. In
Tantric mantras the most important element is the vija, a sacred
syllable considered to be charged with spiritual potency, as also
Shakti or power and a kilaka, a pillar (inner syllables on which the
mantra rests.) All the letters of the Sanskrit alphabets are
considered as different matrikas, minor deities around the main deity.
The mantra is charged with a special potency, so much so that the
Tantrikas believe that when offerings are made to the deity with the
appropriate mantras, the deity accepts them immediately.
Chandogya Upanishad I.1.10 says about the efficacy of the repetition
of Om: Both perform spiritual practices - he who knows and he who does
not know. But knowledge and ignorance are different in their effects.
Whatever is performed with knowledge, faith and meditation, becomes
Meditation and other spiritual disciplines by Swami Swahananda