Density = mass / volume
To solve for volume, multiply both sides of the equation by volume. This will cancel volume on the right and place it on the left.
volume x density = mass / volume x volume
volume x density = mass
Now, divide both sides by the density.
volume x density / density = mass / density
In the end, density cancels out so:
Volume = mass / density