.swapDepths

Hey, this isn’t really a question about anything in particular, but can anyone explain to what .swapDepths does?
or more generally, just swapping in general, if there other swaps.

I just want to fully grasp some stuff… so I want to understand it better.

Thanks a lot