The ordering cost is incurred with each order (processing, transport, receiving) and pushes toward ordering large quantities rarely. The holding cost is incurred per unit stored per year (financial tie-up, warehouse, insurance, obsolescence) and pushes toward ordering small quantities often. The total annual cost is the sum of the two.
Example
Total annual cost = (D / Q) x S + (Q / 2) x H.