Use a tape measure to determine the square feet. This number is length multiplied by the width. The numbers do not have to be exact since this is an estimate.
Measure the depth. This will always be the vertical measurement or estimate. If you are measuring a pile of dirt it will be the height of dirt pile. If you are digging down, it will be the depth of the hole.
Multiply the depth by the square footage. This number will be the number of cubic feet.
Divide the cubic footage by 27 to determine the approximate number of cubic yards. A yard is 3 feet, so essentially you are dividing by 3 for the length, the width and the depth.