The definition of awrah is the parts of the body that should be covered and this does vary in different situations among different groups of people. The conditions of the dress code for both men and women and thus understood the awrah or, what should be covered in public places. However, to fully implement the Islamic dress code it is important to understand a number of other situations in which awrah becomes important.
O children of Adam, We have bestowed upon you clothing to conceal your private parts and as adornment. But the clothing of righteousness - that is best. That is from the signs of Allah that perhaps they will remember. Quran Surah Araf 7: 26 
Narrated Abu Huraira(R) said: The Prophet (ﷺ) said, "Faith (Belief) consists of more than sixty branches (i.e. parts). And Haya (This term "Haya" covers a large number of concepts which are to be taken together; amongst them are self respect, modesty, bashfulness, and scruple, etc.) is a part of faith." Sahih al-Bukhari Vol1:9
“No man should look at the ‘awrah of another man, and no woman should look at the ‘awrah of another woman.”Sahih Muslim 338
“Modesty is a branch of faith”Sahih Muslim 56 
Tell the believing men to reduce [some] of their vision and guard their private parts. That is purer for them. Indeed, Allah is Acquainted with what they do. Qur’an Surah Nur 24:30
"Ibn Jarhad informed me from his father, that the Prophet (ﷺ) passed by him while his thigh was exposed, so the Prophet (ﷺ) said: 'Cover your thigh, for indeed it is 'Awrah.'" Jami at Tirmidhi Vol. 1, Book 41, Hadith 2798
The appropriate manner of Islamic dress for men:
Allah Says in Quran: “And tell the believing women to reduce [some] of their vision and guard their private parts and not expose their adornment except that which [necessarily] appears thereof and to wrap [a portion of] their headcovers over their chests and not expose their adornment except to their husbands, their fathers, their husbands' fathers, their sons, their husbands' sons, their brothers, their brothers' sons, their sisters' sons, their women, that which their right hands possess, or those male attendants having no physical desire, or children who are not yet aware of the private aspects of women. And let them not stamp their feet to make known what they conceal of their adornment. And turn to Allah in repentance, all of you, O believers, that you might succeed.” Quran Surah Nur 24:31
A mahram is a person one is never permitted to marry, because of a close blood relationship, breastfeeding or marriage. One’s spouse is also one’s mahram.
When a woman is amongst her mahrams, the scholars of Islam agree that a woman does not have to observe strict rules of covering. However, a Muslim woman must always remember that she is known for her modesty and haya, therefore she must never make a wanton display of herself. 
Muhammad ibn Saalih al-'Uthaimeen (Rahimahullaah), was asked: “There is a phenomenon with some women, wearing short and tight dresses which expose their features and dresses without sleeves exposing the chest and back, appearing almost naked. When we advise them, they say that they do not wear such clothes except in the presence of other women and that the ‘awrah of the woman in front of other women is from the navel to the knee. What is the ruling regarding this, and what is the ruling regarding wearing these types of clothes in front of mahrams?
He (rahimahullaah) answered: The answer for this is to say that it is authentically narrated [by Abu Huraira(R), said that the Prophet ( sallallaahu ‘alayhi wa sallam) said: “Two are the types amongst the denizens of Hell whom I have never seen, the one possessing whips like the tail of an ox, and they flog people with them. (The second one) women kasiyatun 'aariyaat: who would be naked in spite of their being dressed, who are seduced (to wrong paths) and seduce others with their hair high like humps. These women would not get into Paradise, and they would not perceive its odor, although its fragrance can be perceived from such and such distance (from a great distance).” Sahih Muslim 5310 and 6840
The people of knowledge interpreted the phrase kasiyatun 'aariyaat (dressed but naked)” as those women who put on tight, short, or light clothes that do not shield what is underneath.