Suppose you want to make a special cake. What all ingredients are required for this and in what quantities? That list is the bill of materials for that cake. A housewife will call it a recipe or simply ingredients. And indeed, in certain process industries the BOM is called a recipe or list of ingredients.
Obviously, the BOM for a different cake, or the same cake but in a different size, will be different. The bill of materials depends on what product or end result is required.
BOM is a list of all material (raw materials, sub-assemblies, sub-sub-assemblies, down to individual nuts and bolts) that is required to make a finished product, or a complete project (or a defined part of it). In the industry, a BOM will be prepared against a specific production order with complete specifications. When specifications change, the materials requirements will change, i.e., the bill of materials will change.
A BOM can be in a modular, multilevel hierarchical form, with the final product at one level, major assemblies listed in the next level (column), subassemblies of each major assembly listed against that in the next column, and further subassemblies against each in the next column etc., down to the smallest items. A bill of materials for production of a PCB will include all the components and materials that go into its production like resistors, capacitors, fuses, fuse links, etc., along with the quantities required. A bill of materials for a photovoltaic installation will include solar panels, support structures, cables, junction boxes, batteries, inverters, etc. on the higher levels, and minor components like screws, nuts and bolts in the lowest level.
For the same product bills of materials can be different. An engineering bill of materials will list all that goes into the design of that product. A production bill of materials will include all that goes into production of that product.
The bill of materials is useful for economical procurement and stocking, and with the addition of other costs, helps in estimating cost of the finished product.