The responsibility for law-making in Massachusetts lies with the Legislature, which is officially known as the General Court. The General Court has two branches, the House of Representatives and the Senate. Both branches work concurrently on pending legislation.
Laws usually originate from proposals sponsored by legislators, the governor or from recommendations of a department or agency, but can also emerge from an idea that a member of the public believes should become law. This page on the Legislature's website explains how an idea becomes a law.