Brick molding is a strip of material used to close the small gap between a brick wall and the frame of a door or window set into the wall. There isn't any brick, or any masonry at all, in molding.
Hardwood was the traditional material used for brick molding. Because hardwoods are resistant to rot and moisture damage, this type of molding had a long service life, sometimes as long as 50 years. Today, it is usually made of softwood, usually fir or pine. Softwood is far more likely to be damaged by weather or rot than hardwood, and thus has a much shorter service life.
Softwood brick molding lasts longer if all the surfaces are both primed and painted before it is installed, including the cut ends. Using metal flashing, so that the molding does not actually touch the brick, also increases the service life. The molding should always be caulked and painted. If it's properly installed, it usually is serviceable for 15 years.
Today, other materials can be used for brick molding. Various forms of plastic cost a little more than softwood, but they have an expected service life of about 50 years, and they do not need to be repainted regularly. They are made of PVC, the kind of plastic used for plumbing fixtures. There are three major plastic types: hollow PVC, plasticized wood, and solid PVC.
Hollow PVC brick molding is shaped like ordinary wood molding, but is hollow inside. It is lightweight and easy to work. However, it cracks easily when being nailed in place and dents easily during use.
Plasticized wood has a core made of wood dust mixed with plastic glue. A thin "skin" of PVC covers all the sides. This kind of brick molding can be sawed, nailed, and painted like wood, but it does not require painting, It does not absorb water, so it doesn't rot. It can split, especially when nails are hammered in. It's best to predrill holes for nailing in this type of molding.
Solid PVC brick molding is easy to work with and does not shatter when nailed. It is not damaged by wood or insects and is resistant to damage from sunlight. It can be painted, but painting is not necessary for a long service life.
No matter what kind of brick molding is used, it should be installed properly and caulked thoroughly. A good seal is essential. Even if the molding itself will not rot, any water that seeps behind it into the wall will cause damage over time.