Xylitol sweetener is made from the distillation of fibrous plants.
Most often it's made from birch trees or corn cobs/husks.
It's been on the market for decades and is most commonly used in chewing gum, mints and candies to help prevent cavities and periodontal disease.
I do like the chewing gums made with it, but I'm not someone who uses it in my cooking. It's popular for diabetic recipes and low carbohydrate recipes where traditional sweeteners are not an option.
Xylitol sweetener works well for a number of recipes where granulated sugar is called for. One exception is yeasted dough recipes, which wouldn't rise properly due to the lack of real sugars.
Although the finished products are very similar, if you're going to cook with it, I'd recommend using birch xylitol, it's more expensive but in general is considered to be a higher quality than the corn derived products.
Birch xylitol is made from natural (usually "organically grown") hardwood trees. Corn xylitol is somewhat cheaper but is often made from genetically modified (GMO) corn, and is often produced in countries where the quality control and treatment of the workers are not always up to the standards we'd want to support.
Xylitol sweetener is considered safe for diabetics and low carb diets, when used in moderation, as it contains only a quarter of the carbohydrates found in sugar, and is not easily converted into fat in the body.
It is considered safe for pregnancy, nursing moms, and for children as well. I remember my mom giving us chewing gum when I was little, called Xylifresh, which was indeed made with xylitol. Now there are a number of chewing gums and toothpastes on the market using xylitol.
Xylitol is a FODMAP ("Fermentable, Oligo-, Di-, Mono-saccharides And Polyols"), a short chain carbohydrate that can cause digestive upset for people with IBS and other digestive disorders. This is because they are not readily absorbed and are then fermented by intestinal bacteria creating gases including hydrogen, carbon dioxide and methane.