This article is a first draft summary of the Shulchan Aruch Harav and is pending further review of additional sources.
The general prohibition of Erva:
Rabbinical prohibition of heart seeing Erva: The Sages added that not only is it forbidden for one’s eyes to see the Erva during prayer or learning Torah, but it is even forbidden for one’s heart to the Erva during prayer or learning Torah, as will be explained in B.
Revealing the Erva: One’s Erva is Biblically required to be covered in all cases. This applies even if one covers his heart and closes his eyes, or turns away his face from his Erva, nevertheless the Erva must be covered while praying or learning Torah.
Gid/penis may not touch thighs: It is forbidden to learn Torah or Daven when the penis touches one’s body, such as one’s thigh. Thus, one needs the separation of a cloth between his thigh and the penis while learning Torah or Davening. However, the testis may rest on the body while one learns Torah or Davens, even though the testies is also considered part of the Erva and must Biblicially be covered.
Turning around, closing eyes: Whenever an actual Erva is revealed, it does not help for the Erva to not be within his vision, such as to close his eyes, or if he is the dark, or even if he is blind, and even in such a case it nevertheless remains forbidden for him to learn or Daven opposite the Erva. This applies even regarding another person’s Erva, and certainly by one’s own Erva of which we rule that it must always be covered during learning and Davening, even if one turns away his face. By another person’s Erva, one must turn to the side until the Erva is no longer opposite him, and only then may he learn and daven.
 Admur 74:1; Ketzos Hashulchan 9:1
 The reason: This is learned from the verse Vehayah Machanecha Kadosh Velo Yiraeh Ervas Davar”. [Admur ibid]
 Admur 74:1; Ketzos Hashulchan 9:2
 Admur 74:2
 Admur 74:6
 This applies whether to one’s own Gid, or to the Gid of another person. [Admur ibid]
 Admur 75:9; Ketzos Hashulchan 9:6