Praise be to Allah, and peace and blessings be upon the Messenger of Allah and his family.
Jarir ibn Abdullah (may Allah be pleased with him) said: "I asked the Messenger of Allah (peace and blessings of Allah be upon Him) about an accidental glance at a woman . He commanded me to turn my gaze away." (Narrated by At-Tirmidhi, who said: This is an authentic Hadith. See As-Sunan, 2700).
Commenting on this Hadith, Al-Mubarakpuri (may Allah have mercy on him) said:
"Accidental means that his gaze fell on a non-Mahram woman unintentionally . He commanded me to turn my gaze away means that he was not to look a second time, because the first glance was not by choice and would be forgiven, but any further glances would be counted as sin, and he should heed the words of Allah (interpretation of the meaning): Tell the believing men to lower their gaze (from looking at forbidden things) [An-Nur 24:30]"
The Messenger of Allah (peace and blessings of Allah be upon Him) said: "O `Ali, do not follow a glance with another, for you will be forgiven for the first, but not for the second." (Narrated by At-Tirmidhi, 2701; see Sahih Al-Jami`, 7953)
In At-Tuhfah, it says: "The words ‘do not follow a glance with another’ mean do not look again after the first glance. You will be forgiven for the first means that you will be forgiven if the first glance was unintentional, and but not for the second means that because the second glance was by choice, it will be counted against you."
So it is clear that deliberately looking at a non-Mahram woman and continuing to look after a first accidental glance is prohibited. It is forbidden to look at any part of her body, whether you think she is beautiful or not, whether it provokes sexual desire or not, whether it is accompanied by evil thoughts or not, and whether it leads to immoral deeds or not.
We ask Allah to protect you and us from all forbidden deeds. Allah is the One Who guides to the Straight Path.
For more details, please see the following answers: 113996 , 49024 , 21784 , and 37654 .
And Allah knows best.