Render out layers?

If I have for example a tree with a lot of leaves on it and a background with some mountains and a path. Say I would want to render out the tree, ground and mountain by themselves. So I could layer them in photoshop afterwards and turn them on and off. I would still want them to affect each other, lights bouncing and shadows etc I just want them to be perfectly cropped at the border of each model. How would I do that?

Use render layers https://docs.blender.org/manual/en/dev/render/cycles/settings/passes.html?highlight=render%20layers

Tutorials https://www.google.co.uk/search?q=blender+render+layers+tutorial&oq=blender+render+layers+tutorial&aqs=chrome..69i57.11567j0j7&sourceid=chrome&ie=UTF-8#q=blender+render+layers+tutorial&safe=off&tbm=vid&*