During Chapter 8, you will visit the grave of Henry Avery and inside, you will come across a locked door with some stars on it. After inspecting it, turn around and check out the lamp behind you to have Sam light it. This will cause the mechanisms on the other side of that wall to emit some light. Using the analog sticks, you can rotate and move these lights to match them up with the stars on the locked door from before. There is only one solution to this puzzle, so follow the video above to finish it.
Check out the full guide: http://www.gamerguides.com/uncharted-4-a-thiefs-end/information
Official Site: https://www.gamerguides.com/
iTunes App: https://itunes.apple.com/us/app/gamer-guides/id599410871