There are six degrees of freedom, as illustrated by the movements of a ship:
Three of these movements are rotations, which corresponds to the movements of a camera on a fixed tripod whose position is being adjusted by moving the tripod head: tilt, pan and rotation between landscape and portrait mode.
The other three of these movements are translations, which correspond to bodily moving the camera through space while it remains pointing in the same direction (as on a gimbal, for example) - fore/aft, left/right, and up/down.
Camera-based stabilization, be it in the lens, via a moving sensor, or by a gimbal, can only correct for rotations. It cannot correct for translations, which is why so many people end up frustrated with their attempts to shoot video while walking - although the camera is stabilized, the up/down bobbing that happens while you walk is often plainly visible. It's also why it's difficult for stabilization to handle very close subjects like macro photographs - at close distances even small translational movements of the camera appear as fairly large excursions of the image in the frame.
Full stabilization in translation basically requires a tripod or similar fixed mount. For video, you often want to stabilize two translation axes while moving in a third, which requires more specialized equipment such as sliders, dolly tracks, cranes, or a full steadicam rig.