We talked about global and local axes. Now, you see the difference in action. You tap an X, Y, or Z key once to specify moving along a global axis; you tap them twice to specify moving along a local axis:
With the camera selected, press the G key to grab it.
Now, tap the Z key twice and move the mouse.
Now, tap the X key twice and move the mouse.
Now, tap the Y key twice and move the mouse.
Press the LMB to let go of the camera.
You discovered that when you press the G key, you can restrict the motion to the global Z plane by pressing the Z key once. If you press the Z key two times in a row, the motion is restricted to the local Z plane. The same applies to the X plane and the Y plane.