A cost that rises and falls with volume: materials, freight, commissions and card fees paid per unit, order or dollar sold.
A variable cost is one that moves with activity. Sell one more unit and you pay one more unit's materials, packaging, freight, sales commission and payment fee. Rent, salaries and software subscriptions do not move with each sale, so they are fixed over the period. Splitting costs this way is what lets you compute contribution margin and a break-even volume.
Variable cost per unit = total variable cost / units. Total variable cost = variable cost per unit x units sold. Revenue minus total variable cost is contribution.
A product sells for $50 and carries $30 of variable cost per unit. At 2,000 units, total variable cost is $60,000 and contribution is $40,000: $20 per unit, a 40% contribution margin.
Semi-variable costs, such as overtime or a warehouse that steps up at a volume threshold, get classed as one or the other and the break-even moves. The full guide is fixed vs. variable costs.