There are many ways to duplicate in After Effects.
1. Select a layer and press Ctrl+D (Cmd+D).
This method will duplicate a layer either it is a pre-comp or a camera.
If you duplicate a pre-comp, it will be the same pre-comp. If you make changes inside one changes will be reflected in another one.
There is a way to prevent it.
2. Select a composition in the project window and press Ctrl+D (Cmd+D).
This method will create a copy of a composition so you can edit it separately.