The density just means how much mass per volume. That means mass (M) divided by volume (V).
It's easy to find the mass M. You can just weigh something on a scale. So the trick is to find the volume V of the irregularly shaped object. As Tom wrote earlier, there's a way to do this.
Take some water, enough to submerge your object. Mark the level of the water. As the object goes into the water, it will force the water up in the container. Mark the level of the water when the object is completely under.
Now take the object out. You can pour water in from a measuring cup (say one marked in liters) to see how much is needed to fill from the lower mark to the upper mark. That volume is the same as the object's volume.
This method is sufficient for the solids which are insoluble in water.