What are "costs of goods sold"?

A. Costs related to the expansion of a new business.
B. Costs directly attributed to providing a product or service.
C. Costs of unsuccessful investments made by a business.
D. Costs of updating policies and standards for a business.