Yep, a 5' cube is exactly what it sounds like.
Note that, just like with horizontal squares, a creature doesn't necessarily take up exactly 5' of vertical space. You might have a 3' halfling, or a 6'10" half-orc, each of whom takes up one five-foot cube in combat.