The name "tofu" here refers to "tofu-like solid"; soy beans, which are the main ingredient of tofu, are not used. This naming convention is also seen in other east Asian dishes, e.g. Chinese yudoufu (鱼豆腐), Japanese tamagodofu.
In the traditional recipe, the primary ingredient is apricot kernel, soaked and ground with water. The kernel milk is extracted, sweetened, and heated with a gelling agent (usually agar). When chilled, the milk mixture solidifies to the consistency of a soft gelatin dessert.
Although the agar-based recipe is vegan, there are numerous nontraditional recipes that are not. Most are based on dairy products and a small amount of flavored extract. Gelatin is also a common substitute for agar.
Almond jelly can be made from scratch or using instant mix. There is an instant soy-based powder with a coagulating agent, which dissolves in hot water and solidifies upon cooling. One popular brand of mix is DoFu Delight.