Thatching is building a roof with dry vegetation such as straw, reeds, sedge (Cladium mariscus), rushes, heather, or palm branches. The vegetation is put on top of each other so as to make sure water stays away from the inner roof.
Thatch can occasionally catch fire. This is one reason for its replacement by slates in modern buildings. Ceramic slates for roofing can be made by industry, and have replaced natural slates in modern housing. Thatched rooves were once a source of fires, but slates are fireproof. That explains the gradual decline in thatched rooves.