Two different ideas
Capacity tells you how much a battery holds in total (Ah or Wh). Capacitance tells you how much charge a capacitor stores for each volt (farads).
Capacity: the battery's charge
A battery's capacity is the total charge it can deliver, such as 3000 mAh. Current flows out to the load until the stored charge runs low.
Capacity runs down
Charge delivered = current × time. A 3 Ah battery supplies 1 A for about 3 hours. The voltage stays fairly steady while the tank empties.
Capacitance: charge per volt
A capacitor stores equal and opposite charges on two plates separated by an insulator. Its capacitance C = Q / V depends on plate area, gap and dielectric, not on how charged it is.
Water tank analogy
Think of voltage as water height and charge as water volume. Capacitance is like the tank's width: at the same height, the wide tank holds far more.
More voltage, more charge
Raise the voltage and both tanks hold more charge, but their widths (capacitances) stay the same. A capacitor's limit is its maximum voltage, not a fixed capacity.
Side by side
Capacity is a total amount (Ah or Wh) that tells you how long a battery lasts. Capacitance is a ratio (F, charge per volt). The energy in a capacitor is ½CV², so it holds a total amount only once you also know its voltage.