Change your workspace to Animation. To do this, go to View, then Workspace, then Animation. You can change this back later, but for now, this will make these instructions standard for all users.
Make your composition 3D-capable. This is done to the left of your timeline, above your list of layers. In the row of effects icons, find the 3D icon, which is a white three-dimensional box. Click on this icon so that it is indented.
Determine the layers you want to make three-dimensional. Select those layers by clicking on their titles. You can make them all 3D at once by holding the command key on the keyboard while you click on them, but you can also do it one layer at a time.
Make your layers 3D-capable. To do this, move your mouse to the right of the layer title, but still left of the timeline. There are three small, square effects boxes that are empty by default. At the top of one row is the 3D icon similar to the one you clicked on two steps ago. This is the 3D layer row. Click inside this box so that the 3D icon appears inside it, and your selected layers are now available for movement in Z-space.