Density is an intrinsic property of matter, that is, it is independent of the amount, size and shape of the matter. Density is defined as the ratio of mass of a substance to its volume and is given as:

Density = mass/volume.

Thus, its units are that of mass per unit volume. Commonly used units of density are grams per cubic centimeter (gm/cm^3), kg/m^3, mg/lt, etc.

Thus, irrespective of the shape of wooden piece, rectangular or circular, etc., density units will stay the same.

Given a piece of a material, we can measure its mass using a weighing balance and then measure its volume. If it has a uniform shape (say spherical, cubical, etc.), we can mathematical equations to calculate its volume. Else, for an irregular object, we can calculate its volume by water displacement method. Knowing the mass and volume of an object, we can calculate its density.

Hope this helps.