Density is the amount of mass located in a specific volume. The density of an object can change if either the mass or volume of the object is changed.
What happens to density when volume changes?
Density is mass per unit volume. The relation between density and volume is directly proportional. That is any change in volume will result in the change in its density and vise-versa.
Does changing the volume change the density?
Density changes with temperature because volume changes with temperature. As you heat something up, the volume usually increases because the faster moving molecules are further apart. Since volume is in the denominator, increasing the volume decreases the density.