The answer to 'types of junction box' is that there are several common types of electrical junction boxes used in homes. The most common are metal electrical boxes, plastic electrical boxes, and old work electrical boxes.
Metal electrical boxes are typically made of steel or aluminum and are the most durable option. They are often used for new construction or major renovations. Plastic electrical boxes are lightweight, easy to install, and commonly used for retrofit or remodeling projects. Old work electrical boxes are designed to be installed in existing walls without having to open up the wall cavity.