Origin 1000 to 1100
A college of Islamic law, and in the classical period a specific institutional form: a building endowed as waqf, with a professor holding a stipended chair in one school of law, student stipends, a residential wing and a library, all funded from the endowment income rather than from fees or from the state.
That structure is the point. Before it, teaching happened in mosques around individual scholars and depended on the scholar's own means; the endowed college made a teaching post an institution that outlived its holder. The Nizamiyya colleges founded by the Seljuk vizier Nizam al-Mulk from 1065, of which the Baghdad foundation is the best known, are the standard marker of the shift, though endowed teaching institutions existed in Khurasan earlier.
The curriculum centred on law and its subsidiary disciplines, Quran, hadith, legal theory, Arabic grammar and rhetoric, and dialectic. The rational sciences, medicine, mathematics and philosophy, were taught in some madrasas and excluded from others, and the extent of that exclusion is disputed. The qualification granted was the ijaza, a licence from a named teacher to teach a named text, which is personal rather than institutional.
In modern usage the word has come to mean any Islamic school, including elementary ones, which is not what the classical institution was.