Density is a measure of how compact the mass in a substance or object is. The density of an object or substance can be calculated from this equation: density in kilograms per meter cubed is equal to mass in kilograms, divided by volume in meters cubed. Or in other words, density is mass spread out over a volume. Or in other, other words, it's the number of kilograms that 1 meter cubed of the substance weights. If each meter cubed weighs more, the substance is more dense.
example of a cube that we see everyday is an ice cube that is formed in your refrigerator and that of a cuboid is a box,a living room etc..A cube is just a special case of a cuboid.