The liner in your, masonry, chimney is built with terra-cotta clay tiles that are stacked on top of each other and mortared together. Once in place the liner is a gas-tight and heat-resistant insulator that protects the masonry chimney. If the liner is absent or has cracks there would be heat transfer and gas leaks to combustible materials which could cause a fire and/or seepage through the brick and mortar.
Another type of liner is a stainless steel liner. These are often found attached to a furnace, woodstove or fireplace. Your heating source will vent up through the stainless steel liner. The liner is housed inside of your existing brick structure. New liners give a homeowner efficient chimneys that are safe to use and solve most issues regarding drafting.