In the time of the Talmud, it was common to build houses that opened onto a communal courtyard. The courtyard was shared property belonging to all of the homeowners whose houses opened onto it, and they – as well as members of their household – were permitted to use it in a reasonable way.
The Mishna on our daf describes uses that are considered inappropriate. Among them are situations where there is a problem of hezek re’iyah – damage to the privacy of the people who use the courtyard, e.g. when adding new windows to the house that open onto the public space – or because it adds additional residents to the courtyard. Thus, according to the Mishna, a resident cannot build an additional floor to his house if it opens to the courtyard, although he is allowed to build an additional room in his house, or even an additional floor, so long as it opens directly into his house and not into the public space of the courtyard.
The Rashbam and other rishonim explain that the Mishna would not permit the addition of another room or floor that is separate from the existing structure, rather what would be permitted is dividing up an existing room or building an additional floor within the existing air space of the house. This would be permitted since a person is allowed to have guests or even renters share his space, and no one in the courtyard can object. The Ramah argues that although the Mishna permits dividing up space in the house, it does not allow the addition of residents; dividing up the house would be permissible only for the purpose of creating storage space.
Some of the commentaries (the Ri”f and Rambam) rule that the simple reading of the Mishna is correct, and that even full additions can be built, so long as they open into the person’s house, since by doing so additional residents would not be directly affecting the flow of foot-traffic in the communal courtyard.