When to permute two times to find optical configuration I'm learning about S and R configuration, and I know that in case where the 4th substituant is not behind we should permute it with the one which is behind. then we find the new configuration and use the opposit, if we find it R then the original configuration is S.

My question concerns the case when should I make 2 permutations ? Is that even possible ? because this will give back the original configuration but I dont know what are the cases which I use only one permutation and what are the cases where I apply more than one permutation, this seems very confusing.
If you switch any two substituents, that will change the stereochemistry. If you do a second switch (any two), you are back to the original stereochemistry. You can try it out with substituent 4 in the back, and seeing what switching around 1, 2, and 3 do to the clockwise or counterclockwise orientation (i.e. whether it is R or S).

Two switches (for example switching 2 and 4 and then switching 3 and 2, see animated GIF) amounts to a rotation around the bond of the "unswitched substituent (here substituent 1). This does not change the stereochemistry.

If you are spatially gifted, you can just do the rotation in your head to get substituent 4 in the back. If not, you can do one switch (realizing you just interchanged R and S) or two switches (R stays R, and S stays S). It is personal preference (oops, I think I just said the question should be closed because the answer is opinion-based).

If you want to try it with 3D models yourself, check out http://proteopedia.org/wiki/index.php/R/S_nomenclature.