Sometimes, you want to move an object freely, and sometimes, it's better to move it along one axis. Here's a way to move it, by specifying the axis by letter:
Load a new file into Blender.
Select the camera with the RMB. Press the G key to grab it. Now, move your mouse.
Now, tap the Z key and move the mouse.
Now, tap the X key and move the mouse.
Now, tap the Y key.
Press the RMB to let go of the camera.