The Urdu language is a variant of Hindustani that evolved from the 6th century up to the 13th century from a form of Apabhraṃśa that came from the Shauraseni language. The latter is a Middle Indo-Aryan language from which other languages such as the Punjabi dialects came from. About 75% of Urdu words and 90% of verbs have roots from Prakrit and Sanskrit. The Persian language was heavily influential in the development of Urdu, with some help from Arabic.
Urdu came from orda or ordu, which is a Turkic word for ”army.” This is also the origin of the English word ”horde.” This does not mean that Urdu is akin to the Turkic languages. There was no direct borrowing of Urdu from Turkish words. Words that originated from Arabic and Chatagai (a Turkic language) were borrowed from Persian instead of from Turkic. Since Turkish and Urdu both borrowed from Persian and Arabic, the pronunciation of many words in Urdu and Turkish are similar.
Ghulam Hamadani Mushafi used the term Urdu for the first time in 1780. It used to be called Hindi from the 13th to the 18th centuries. However, Urdu was also called other names, like Dehlavi and Hindavi. In written form, it used the Persian script that Hindus and Muslims used. The practice continued until 1837 when Hindustani replaced Persian as the official language together with English.