Though the cylinder is three-dimensional, it still consists of two circles (the base and the top) with its height (volume) in-between. For the cylinder to fit into the box, the diameter of its circular top must correspond to the width or lenth of the box with a height that matches the box (once again, in order to fit in).
The the box measures 8 width by 10 lenth by 6 height, your cylinder's top cannot have a diameter (measure across) more than 8. You might think that it can measure 10, but it cannot because it won't fit the width of the box, which is 8. So, you are always limited by the width of the box. Here the width/diameter is 8. Half of the diameter is radius, which is 4. the formula for area of a circle is radius squared multiplied by pi. And to get the volume of the cylinder, you multiply the area of the circular base or the top by the height of the cylinder.