Sayyidi wa sanadi Mufti Mohammad Taqi Usmani (Allah preserve him) said,
‘It has to be acknowledged here that the required khushu‘ (reverence, serenity and presence of mind) has multiple levels.
The first level is essential (fardh). That is, at least at the moment of opening takbeer (tehrimah) an individual brings to his mind (actively) that he/she is praying. Absence of this will make the salah void.
The best and highest level (of khushu‘) is that during the entire salah nothing transpires except the thought of Allah. (As is mentioned in the Prophetic saying)
The middle level (in between these two) is the one each Individual must strive to attain. That is, one should be aware and attentive of the words that are being recited during salah.
One should be cognizant of what is being recited. On reciting الحمد لله رب العالمين he should have knowledge that he said الحمد لله رب العالمين. On saying الرحمن الرحيم he should know he recited الرحمن الرحيم. One should strive for this level of khushu.
Salah should not be (offered) like switching on a machine (that runs on its own) and comes to culmination (automatically). (That is without attention and awareness.)
Even if some involuntarily thoughts come during salah they will in-sha-Allah be forgiven provided that on becoming aware of this derailment one returns to being attentive of the words being recited.
Initially one has to be be attentive towards the words being recited, than gradually the attention will turn towards Allah.’
Inam ul Bari, volume 3, page 472