People who wish to sell insurance in Massachusetts need to be licensed as a producer. The term producer includes insurance agents and insurance brokers. Insurance agents are primarily representatives of insurance companies while insurance brokers are representatives of people buying insurance.
Anyone wishing to obtain either license is required to pass an examination administered for the Commonwealth by a company named Thomson-Prometric, http://prometric.com/Massachusetts/Insurance.htm. The price for the exam is currently $59 per line, but you must check with Thomson-Prometric to confirm the pricing. This examination is administered regularly, by previous appointment. To set up a test you can call (800) 741-9380.
For a copy of the outlines for the various licensing tests, you can see https://www.prometric.com/en-us/clients/insurance/Documents/massachusetts/MA_INS_Handbook.pdf