Capacity refers to the amount of a substance that a container can hold. It is very similar to volume, but has some differences.
Capacity vs. volume
The terms volume and capacity are often used interchangeably since in many cases the difference between the volume and capacity of an object is relatively small. In some cases though, there can be significant differences between the volume and capacity of an object.
Capacity is typically measured using liquid measures such as liters, milliliters, gallons, pints, and more. Rather than measure the amount of space an object such as a container takes up, it measures how much can potentially fit inside the container.
An everyday example of this can be seen using something like a measuring cup. The measuring cup below can hold up to 1 cup of a substance.
This "1 cup" is the capacity of the measuring cup, not its volume (though we could say that the container can hold a volume of 1 cup of some substance). The volume of the measuring cup as a whole includes all of the three-dimensional space it takes up, which includes the handle of the cup and the thickness of the cup.
Even if the cup had no handle, there would be a small discrepancy between the volume of the cup and its capacity since the walls of the cup have thickness. With the handle however, the volume of the cup will be significantly different from its capacity.