1- Turning the chest nullifies the prayer, i.e. turning the chest from the direction of the Qiblah because facing the Qiblah is a condition for a valid prayer.
2- Turning the head or just the eyes, while the body is still in the direction of the Qiblah; this is a disliked deed unless the Muslim has to do that for a reason.
If we do that the reward of prayer will be less, but it will still be valid.
‘Aa’ishah said: I asked the Messenger of Allah (Peace Be upon Him) about looking around whilst praying, and he said: “That is something that the Shaytaan steals from a person’s prayer.” (Sahih al-Bukhari: 751)
This is a disliked turning if there is no necessity, if there is a need for it like fear of being harmed, or for one's wealth then it is not a disliked turning.
There is a new kind of turning or wandering which is the wandering of the heart, i.e. thoughts which distracts the one praying from focusing on his prayer.
Ibn Uthaymen, may Allah have mercy on him, said:
There are two kinds of Turning:
First: The body, or the physical one, which is when the head turns.
Second: The heart, which is nonphysical turning represented in the insinuations and suggestions which affects the heart. This is the defect that affects almost everyone; it is very difficult to cure. Very few people do not suffer from it. This kind of turning decreases the reward of praying, it is not partial, it can be from the beginning to the end of the prayer. The same applies to this kind of turning in terms of Shaytaan steals from the person's prayer through the wandering of the heart.
Al-Sharh al-Momta' (3/70)
Al-Mawsou' al-Fiqhayh (27/109)
Fatawah al-Lajnah al-Da'imah "Permanent Committee for Scholarly Research and Ifta" (7/27)
Fatwa Ibn Baz (11/13)