Most municipalities have a set of guidelines either online or at the building inspection department that will describe the types of projects that require a permit. In general anything that is cosmetic does not require a permit such as, flooring, painting, or even replacing bathroom vanities, or kitchen cabinets and countertops. If you have to move any plumbing drains or water supply lines then a permit is required. The inspector will want to see how the drains are routed and how many bends or fittings are used to make the move. The inspection department will tell you that any new electrical work has to be permitted. This is to make sure a licensed electrician is doing the work and like plumbing the contractor must be insured to protect the home and homeowner from any liability issues. If you are just changing devices and cover plates or light fixtures then you don’t need a permit.
The penalty for getting caught without a permit will vary from area to area. Most of the time it is a fine where the amount is determined by the inspector and the permit fees. Building inspectors do not take it lightly when they find someone doing work illegally or without a license and can make the rest of job difficult to get green tagged by picking apart everything you do and they can make you cut open walls to see the concealed work. If you are a contractor for a living then the inspectors can make all your future jobs difficult once they know you have tried to get away without pulling a permit.
If you are fixing up a house for resale purposes and manage to get it done without pulling a permit you may still run into issues with a home inspector (not a building inspector) hired by the prospective buyer or realtor. The home inspector is paid to find every issue with a home to make a complete report for the home buyer and if they see anything not to code it will be listed on the report. This can lead a buyer to request a courtesy inspection from the building inspector at which time they will see that no permit has been pulled for the updates. In the end it is always better to permit the job right up front to make sure you don’t run into any issues down the road that will cost more money.