Shomer Negiah שומר נגעיה

אִ֥ישׁ אִישׁ֙ אֶל־כָּל־שְׁאֵ֣ר בְּשָׂר֔וֹ לֹ֥א תִקְרְב֖וּ לְגַלּ֣וֹת עֶרְוָ֑ה אֲנִ֖י הָשֵׁם׃

"No man shall come near to any of his close relatives, to uncover [their] nakedness. I am Hashem."

וְאֶל־אִשָּׁ֖ה בְּנִדַּ֣ת טֻמְאָתָ֑הּ לֹ֣א תִקְרַ֔ב לְגַלּ֖וֹת עֶרְוָתָֽהּ׃

"To a woman during the impurity of her separation, you shall not come near to uncover her nakedness."

- This verse, which prohibits intercourse with a niddah, applies not just to one's wife but to any other women as well, married or not (Responsa Rivash 425, Vayikra 18:19).

- The Rabbis extend this prohibition to include not just sex, but all touching. And since unmarried women do not go to the mikveh, they are considered to be always in a state of niddah, and therefore are always off-limits for sex, or physical contact with men.

רמב"ם:

כל מי שנוגע אישה נידה בחיבה או רצון , אף אם המעשה נופל קצר של יחסי מין, מפר מצווה התורה שלילית

Rambam:

Whoever touches a woman in niddah with affection or desire, even if the act falls short of intercourse, violates a negative Torah commandment.

רמב"ן:

מעשים כגון חיבוקים ונישוקים אינם מפרים מצוות לא יעשה של התורה , אלא איסור דרבנן בלבד

Ramban:

Acts such as hugging and kissing do not violate a negative commandment of the Torah, but only a rabbinic prohibition.

- The Siftei Kohen further explains the Rambam by stating that the Rambam was only referring to hugging and kissing associated with intercourse. There are several places in the Talmud that the Amoraim hug and kiss their daughters and sisters and their behavior in considered permissible.

שו"ע אבן העזר - סימן כא סעיף ז
המחבק או המנשק אחת מהעריות שאין לבו של אדם נוקפו עליהם, כגון אחותו הגדולה ואחות אביו וכיוצא בהם, אע"פ שאין לו שום הנאה כלל הרי זה מגונה ביותר ודבר איסור הוא ומעשה טפשים, שאין קרובים לערוה כלל, בין גדולה בין קטנה, חוץ מהאב לבתו ומהאם לבנה.

Sister and Brother:

Shulchan Aruch Even Haezer 21:7

One who hugs or kisses a relative for whom there's no attraction -- such as his adult sister, or his mother's sister, and the like -- while there is no lust or pleasure at all, this is exceedingly distasteful. And this is prohibited, and the act of fools -- as we do not get close to prohibited relations at all, whether child or adult, other than a mother to her son or a father to his daughter.

Sitting on a Bus:

If it is not a lustful or desirable act, one is not held accountable for unintentional touching.

Rabbi Moshe Feinstein looked at the issue of public transportation and said that "regarding the permissibility of traveling in crowded busses and subways during rush hour, when it is difficult to avoid being pushed by women: Such physical contact involves no prohibition, because it does not contain any element of lust or desire"

Hand Shaking:

Shulchan Aruch forbids many types of interactions such as winks and gestures, but touching without intention of affect is not one of them.

Rabbi Moshe Feinstein wrote several responses on the matter (Igrot Moshe, Even Ha'ezer 1:56 and 4:32 and Orach Chaim 1:113). In one instance he writes that shaking hands is "certainly clearly forbidden." In another, he explains that while there is room to be lenient based on the Shach, who permits touch that is not intimate, it is difficult to rely on this, since it is hard to ascertain that there is no desire involved at all.
Does the same apply to shaking an already proffered hand, where there is the concern of embarrassing someone? In that case, he writes: “As far as your having seen even pious individuals returning handshakes offered by women, perhaps they think that it does not constitute an affectionate act, but it is difficult to rely on this.”
Rav Menashe Klein, author of the Mishne Halachot, writes that handshaking, even to avoid embarrassment, is forbidden for three reasons: 1) Many decisors disagree with the Shach and write that even touch that is not affectionate is forbidden. 2) The Shach's lenient ruling is in regard to a doctor involved in his work; it is possible that even the Shach would forbid handshaking. 3) Even if a handshake begins non-affectionately, it can easily lead to something more affectionate, which all would forbid.