A mosque exists first to organize the five daily prayers and, above all, the Friday congregational prayer, jumu'ah, at which attendance is a communal obligation for adult Muslim men and the sermon delivered from the minbar addresses the whole community rather than any single worshipper. Prayer inside a mosque is led by an imam, a role that requires no formal ordination in Sunni practice, only recognized knowledge and standing, and the congregation lines up in rows parallel to the qibla wall, following the imam's movements through the prayer's cycle of standing, bowing and prostration. Worshippers remove their shoes before entering and perform the ritual ablution, wudu, beforehand, usually at a fountain in the mosque's courtyard or an attached facility.
Historically the mosque was rarely only a prayer hall. The great mosques of classical Islam doubled as centers of learning, with attached madrasas teaching law, theology and the Quranic sciences, and as venues for community deliberation, legal judgment and even, in the mosque's earliest Medinan form, the seat of governance itself. Most mosques set aside a separate area for women, sometimes a rear section of the same hall and sometimes a screened gallery, though the exact arrangement is a matter of custom rather than uniform legal requirement. The call to prayer, the adhan, sounded five times daily from the minaret, remains the mosque's most public signal, audible to the surrounding neighborhood regardless of who is inside.