From the UNHCR: "The 1951 Convention relating to the Status of Refugees is the key legal document in defining who is a refugee, their rights and the legal obligations of states."
From the UNHCR: "Internally displaced persons, or IDPs, are among the world's most vulnerable people. Unlike refugees, IDPs have not crossed an international border to find sanctuary but have remained inside their home countries. Even if they have fled for similar reasons as refugees (armed conflict, generalized violence, human rights violations), IDPs legally remain under the protection of their own government - even though that government might be the cause of their flight. As citizens, they retain all of their rights and protection under both human rights and international humanitarian law."
From the UNHCR: "Nationality is a legal bond between a state and an individual, and statelessness refers to the condition of an individual who is not considered as a national by any state."
The U.N. High Commissioner for Refugees is mandated to lead and coordinate international action to protect refugees and resolve refugee problems worldwide. Its primary purpose is to safeguard the rights and well being of refugees.