Bonemeal is an item that is used as fertilizer or as a white dye.
It can be obtained by crafting it from bones. A bone yields 2-6 pieces of bonemeal depending on the type of bone you use. See the table on the bones page for that.
You can also craft it from dirt and nitre.