Congregation is used in Catholic and Protestant contexts for three different objects, and the overlap causes real confusion.
A gathered assembly. People who come together to worship, defined by attendance rather than by residence, which is what distinguishes a congregation from a parish. Where congregational polity operates, in Baptist, Congregationalist and most independent evangelical churches, that assembly is the whole church: it owns its property, calls and dismisses its own pastor, decides its own doctrine and discipline, and is answerable to no higher body whatsoever. Associations and conventions exist and are voluntary, and withdrawing from one has no effect on the congregation's standing. The arrangement produces notable adaptability and a notable tendency to split, since there is no mechanism to prevent a division and nothing to appeal to when one occurs. Property disputes in such churches end up in the civil courts by default, and a substantial body of secular case law on religious property has accumulated as a result.
Synagogues and mosque congregations are similar in this respect: constituted and funded by their own members, not territorially assigned, and in most countries incorporated as ordinary civil associations. A synagogue requires a quorum of worshippers for certain prayers, which is a requirement about numbers of people rather than about the presence of any functionary.
A department of the Roman curia. Until 2022 the central administrative offices of the Catholic Church were called congregations, as in the Congregation for the Doctrine of the Faith. They are now dicasteries. Older references to a congregation ruling on something mean this, and mean an office in Rome rather than a group of worshippers anywhere.
A type of religious institute. A religious congregation is an order whose members take simple rather than solemn vows, a category that includes most of the teaching and nursing sisterhoods founded in the eighteenth and nineteenth centuries.