The top, back and rim of a classical guitar body are very thin (1-2 mm), so a flexible piece of wood called kerfing (because it is often scored, or kerfed to allow it to bend with the shape of the rim) is glued into the corners where the rim meets the top and back. This interior reinforcement provides 5 to 20 mm of solid gluing area for these corner joints.
During final construction, a small section of the outside corners is carved or routed out and then filled with binding material on the outside corners and decorative strips of material next to the binding, which are called purfling. This binding serves to seal off the endgrain of the top and back. Binding and purfling materials are generally made of either wood or high quality plastic materials.
Source of article: Wikipedia