The volume of a rectangular prism is given by the formula $V = lwh$, where $l$ is the length, $w$ is the width, and $h$ is the height.
We are given that the length and width of the rectangular prism are both 4 cm, and its volume is 48 cm$^3$.
Substituting these values into the formula for volume, we get $V = lwh = 4 \times 4 \times h = 48$, so $h = \frac{48}{4 \times 4} = 3$ cm.