The presence of heart means that the heart and attention of the one who offers his prayer is with God during the pray. The presence of heart is more profound than mere attending the meaning of the words of prayer, although this may be a good start to reach the presence of heart.
Two she-camels were gifted to the Messenger of God. One was fatter than the other, but the other was bigger.
The Messenger of God (P.B.U.H&H.P) announced to his companions that whoever can offer two units of prayer during which he does not think of any worldly affairs, he would gift one of the she-camels to him. No one nominated himself even after the Prophet repeated his offer three times. Imam Ali (A.S) then stood up and said: “I will do that, O Messenger of God. From the time I recite Allah-o-Akbar until when I say my last Tasleem, I think of nothing other than God.”
The Prophet (P.B.U.H&H.P) of Islam asked him to get ready and offer a two-unit prayer under the supervision of the Prophet (P.B.U.H&H.P).
The challenge began, and as soon as Imam Ali (A.S) finished his prayer, the Archangel Gabriel descended to the Prophet (P.B.U.H&H.P) and said: “O Muhammad! Allah greets you and says: give one of the two camels to Ali!”
The Prophet (P.B.U.H&H.P) said: “The condition was that he should not think of other than God, but in his Tashahud, he thought about which camel he should ask for.”
Gabriel said: O Muhammad! Indeed God greets you and says: Ali was thinking which one would be better for charity. Thus, his thought was for the sake of God, not for a worldly pleasure!”
The Messenger of God (P.B.U.H&H.P) gifted both of the she-camels to Ali (A.S) while he had tears in his eyes. Upon this a verse was revealed to him: “Verily, therein is indeed a reminder for him who has a heart or gives ear while he is heedful.” (50:37)
The degree of Imam Ali’s (A.S) presence of heart was so high and strong that in one of the battles a piece of an arrow had remained in his foot. Having no anesthetic drugs, to remove the piece would have been too painful, and to leave the piece in his body would cause the wound to become infected and would also affect his mobility.
Lady Fatima al-Zahra (S.A) suggested that the piece of stick be removed from his foot while he was praying, as the Imam would not be conscious of his physical body. The operation was a success whilst he was in prostration!
[Source: Kashani, al-Mahajatul-Baydaa, vol. 1 p. 397]