Here are the answers to your questions:
1. Madrassa refers to an Islamic religious school or college for the study of the Islamic religion.
2. The first madrassa was established in Madina called "Suffa" on the east side of the Al-Masjid an-Nabawi mosque, where Hazrat Muhammad was the teacher.
3. The 5 aims and objectives of madrassa are: to teach Quran, Islamic injunctions, morality, impart Islamic education for future generations, and establish a caring environment for excellence in Islamic education.
4. Mosques played a pivotal role in education from the early days of Islam. They taught both religious and secular subjects and housed important libraries