Table Top Role Playing is a strange beast. It is a game. It is something people do for fun. In a very real way it is just "pretendy fun time stories" and as such not something that you should get too worked up over in any negative way. And yet, at the same time it is almost 100% pure social interaction. The game itself may be pretendy fun time stories, but how it works is by friends sitting around a table, talking, and through their creations opening themselves up to each other. Because of this, especially when you are doing a game that is not clearly "the good guys fight the bad guys" it can be a good idea to bring up the Social Contract in a more deliberate and verbal way and discuss the game, and what it will be about, before you actually start playing.
What Is A Social Contract
A social contract is effectively the unwritten rules of the game. Now some parts of the Social Contract are considered to be automatic for most groups. For example, the GM has the final say on conflicts regarding the game (even if not stated in the rules) is a common part of game related social contracts. The "don't be a wanker" rule is also an assumed part of social contracts - though sometimes it does need to be stated clearly too.
Ultimately though, a social contract is a way for people to express the direction they want things to go, and things they are not comfortable with having in the game.
Why Do We Need To Discuss This?
For some groups and some games you don't. If you've played with the same group for 15 years then odds are you all know each other and don't need to discuss what is acceptable and what isn't. It's not that you don't have a social contract, it's just that it was negotiated over that 15 years and is mostly unspoken but fully understood. For other groups though, especially in store games or groups where a new player is entering, it can be helpful to go over some of the core assumptions, directions, and restrictions that are going on in the game.
Where discussing this can be very important is for any game where the PCs are going to be playing villains or are considered criminals by the world in the game. Why? Because in those games you often run into the confusion of just how dark and just what type of criminals do folks want to play. If the GM wants rogues with a heart of gold and all the players want to bring an unrepentant Dexter into the game there is going to be a conflict of interest that is likely to make the game very stressful for everyone and completely unfun for the GM. On the other hand, if the GM wants the players to go nuts sating their dark desires, but one of the players doesn't want to, they could end up very uncomfortable in the game.
Limits And Comfort Are Key
The two big things you want to bring up in this discussion are Limits and Direction. Limits are probably the most important because limits make sure that the players are comfortable playing the game, and therefore will play.
Now, when I say limits I don't mean like "no Orc PCs." I mean limits on the kind of content that could come up. For example, one of the common limits put on games my group plays in is "no onscreen rape or torture." Another is "no rape or graphic torture of PCs." As a group we're ok with mature stories that involve these concepts, but we don't want it happening on screen and we don't want that level of violation happening to a character whose headspace a player is expected to live in for 4-6 hours every Friday.
By having these limits firmly stated both the GM and the players know that it is not ok and won't be tolerated. It doesn't matter if I, personally, am comfortable with dealing with that story arc. What is important is that one of the other players is not comfortable with the idea of it, and as the game is meant to be fun that makes it off limits.
Direction Is Just As Important
Less for player mental health and more for the game going smoothly the other thing to discuss is the direction the game is going to be going in. This, without giving away spoilers, gives everyone an idea of what kindof game is going to be run so that they can make characters appropriate to that game.
This could be as simple as the GM saying that they want to run a super hero game where the players are all young, but already masking up, super heroes just waiting to make it big or get recognized to as complex as the GM wanting to run an Edge of the Empire campaign where the players are all criminals but have strong moral compasses that preclude them from doing anything truly awful even if they break the law in other ways all the time.
In the first example the players know that, for whatever reason, the part where you find out you have powers and decide if you're going to hide them or use them is over. The characters that the GM is looking for are already suiting up to stop crime. If, in this case, a player were to make someone who was still being reluctant it's not on the GM to make them involved because the player has knowingly violated the stated direction of the game.
Why This Matters
I said this above, but it bears repeating. The purpose of these social contracts is to keep everyone on the same page about things. If you're keep is drifting or beginning to stress you out - as a player or GM - because the game you're playing isn't the one you signed up for, then it might be worth bringing up and talking out. Especially if the actions happening make you as a player uncomfortable. There is little worse than sitting at a table, being expected to stay in character, and being subjected to imagery that you are not comfortable with. I've seen players leave games over it. I've seen people lose friends over it. It isn't worth it in the long run.
Stay safe, and have fun. Games can tell serious stories and explore very serious and dark places, but the more you go for those dark corners of the mind the more you need to make sure everyone is comfortable with the trip.