You can replace a fixture or outlet in MA but if you're running new wire and such, you need to pull a permit for that work, so there is oversight there.
You're also entering an area where if you're a homeowner and you're not pulling all the proper permits for you, you may nullify a homeowners policy.
It's best to hire professionals or ask the local jurisdiction what you can/cannot do own your own and with/without permits.