The grain of a fact table is what exactly one row represents, for example an order line or a sale per product and per day. It is decided before anything else, because it determines the possible dimensions and the meaning of aggregates. Mixing several grains skews calculations.
Example
Grain: one row = one item of an order.