The history of veiling is so long that it's impossible to know when or where it started. Though Muslim women are associated with veiling, the practice began before Islam. It's likely that the veil started as a sign of privilege; women who didn't have to work wore veils because they didn't have to worry about the practicality of the garment.
Before we go any further, though, it's necessary to stop and clarify some vocabulary. Often in the West, all veils and head coverings are thought to be burqas, but that term only applies to a small subset of garments. A burqa is a word primarily used in Afghanistan to denote a full-body cloak that thoroughly covers the face of the wearer; there may only be a mesh screen for the eyes. There are also full-body cloaks that don't obscure the face, such as the abaya in Saudi Arabia and the chador in Iran; both of these countries mandate that women cloak themselves.
Hijab is a very general word that encompasses all sorts of head coverings and scarves. These scarves don't necessarily have full gown accompaniments, but they might. A niqab is a face veil that can be worn with a hijab so that everything but the eyes remains veiled. The two terms at the center of debates about the veil, therefore, are burqa and niqab, as these are the coverings that obscure the face.
Though hijab refers to the headscarves that Muslim women wear, the word also refers to the reason why many women wear the scarves in the first place. In Arabic, hijab means barrier and partition, but within the Islamic religion, it also refers to principles of modesty and behavior that adherents believe the Prophet Muhammad wishes them to live by. Calls for modesty appear in the Quran, but as with most things involving these veils, scholars are divided on what exactly the verses mean.