Assume that n copies of unit cubes are glued together side by side to form a rectangular solid block. If the number of unit cubes that are completely invisible is 30, then what is the minimum possible value of n?
First of all, it's only given this much in the question so, I don't clearly know how the cubes the glued, only side by side or randomly on any side of the cube, the question itself is unclear to me, please help...

The question means that the cubes are glued together to form a rectangular parallelepiped. Suppose they form a $l\times w\times h$ brick, so that $lwh$ small cubes are used.
Then the number of invisible cubes is $lwh$ minus the number of cubes we can see. We see $2$ faces with $lw$ cubes, $2$ with $lh$ cubes, and $2$ with $wh$ cubes, giving $$lwh-2lw-2lh-2wh,$$ but the cubes along the edges have been subtracted twice, so we have to add $2(l+w+h)$ back in. Now the cubes at the corners have been added in $3$ times and subtracted out $3$ times, so we must subtract them.
Thus the number of invisible cubes is $$ lwh-2lw-2lh-2wh+2(l+w+h)-8=30\tag1$$ and we must find positive integers $l,w,h$ that satisfy $(1)$ and minimize $lwh$.
I won't take this any further, since your question only asks for an explanation of the problem. I suggest you work on it, and ask another question if you run into difficulty.
EDIT
This isn't a very good way of looking at it, on second thought. The invisible cubes themselves form a cuboid of dimension $(l-2)\times(w-2)\times(h-2)$.