Ajapa japa is attained through the surrender of mental effort and thought that seeks understanding to unbounded consciousness that can realize and experience a mantra.
Mantras are used in yoga as a means for self transformation. When a yogi recites and repeats a mantra, they are working towards quieting the fluctuations of thought in the mind.This allows the mind to be still and clear. Mantras can be simple or complex, but they all provide an anchor for the mind and breath. Over time, the yogi can progress to ajapa japa, as they learn the mantra, to finding the meaning in the mantra and realize it. When realization of a mantra occurs, a yogi will no longer have to recite the mantra, as the meaning of the mantra is experienced in the consciousness. There is no predetermined timeframe for how long it can take for a yogi to achieve ajapa japa; it can literally take from a matter of seconds to a few years.