Inserts are either gas or wood burning, could be pellet but we see very few of these in the Bay Area. They are a highly engineered metal box, fabricated in a factory and designed to be clean burning and they slide into the firebox of either a masonry or factory built fireplace.
The manufacturer of each of these inserts will specify the venting materials required for the insert, the clearances to combustibles and provide installation directions for each model they manufacture. These appliances have all been tested and approved by some testing laboratory.