Density is a way to describe how many atoms are packed into a space. The atoms of different substances pack differently, so as a result the weights of the two substances will be different even if the volumes are the same.
Density is calculated as the mass of a sample of the substance divided by the volume of that sample. This tells us how dense it is in some standardized unit such as grams per cubic centimeter. This is useful, as you can actually use the density as a property to help identify what the substance is. For instance, a lot of metals look similar, so density can be used to help figure out what a sample of metal might be; and you can figure out the density just by weighing and measuring the object, so you don't need to damage it to find out what it is.