The aim of this paper is to provide a logical framework which enables reasoning about institutions and their dynamics. In our approach an institution is grounded on the acceptances of its members. We devote special emphasis to the role of legislator. We characterize the legislator as the role whose function is the creation and the modification of legal facts (e.g. permissions, obligations, etc.): the acceptance of the legislators that a certain norm is valid ensures that the norm is valid. The second part of the paper is devoted to the logical characterization of two important notions in the domain of legal and social theory: the notion of constitutive rule and the notion of norm of competence. A constitutive rule is a rule which is responsible for the creation of new kinds of (institutional) facts. A norm of competence is a rule which assigns powers to the agents playing certain roles within the institution. We show that norms of competence provide the criteria for institutional change.