Whenever a new object is added, it will appear wherever the 3D cursor is. If the 3D cursor has accidentally moved by a stray, left-click is good to center the view and reset the 3D cursor to the origin by pressing Shift + C before adding a new object.
Select Add in the Info panel menu or press Shift + A and select Mesh | Cube in the menu.
Click on the Object tab in the right-hand sidebar and rename this Cube to
.The newly created cube is being seen from the front orthographic view so it looks like a box, but it does have depth. Rotate the view to confirm this. The cylinder is also entirely inside the mug body but it is visible because of wireframe mode. Press Z to toggle back to solid view and the cube will be hidden by the body. Remember to undo any view changes by pressing Numpad 1 or choosing View | Front and toggling to Wireframe...