The generic name for religious orders, congregations etc. is ‘religious institutes’. Most religious institutes are said to be of either pontifical right or diocesan right; this means that they are predominantly answerable to either the pope, or to the bishop in whose diocese is found the main house of the institute.
Although religious are always responsible to a local bishop in diocesan matters (if they are managing a parish, or a school on his behalf, for instance) issues regarding internal house management and discipline are reserved to the institute.
However, in terms of general oversight and constitutional matters, authority is reserved to the pope in the case of institutes of pontifical right, and to the bishop in institutes of diocesan right. This means that they are the respective people to whom appeals for dispensation are made, and also the authority who can provide ratification of elections and other matters. An institute of pontifical right consequently has greater (although not absolute) independence from the local bishop.
The details are explained in the code of canon law. See:
vatican.va/archive/ENG1104/__P1Y.HTM
Hope this is clear.