[camera pans up to reveal the studio lights]
Will: ...why we can't afford no ceiling?
The majority of sitcoms, a fair chunk of dramas and much sci-fi series are filmed in three wall sets. You see three walls of the room, as if looking through the invisible Fourth Wall, where the cameras and equipment are. This is a trope that has been ubiquitous since the early years of television, for example, see I Love Lucy or Our Miss Brooks.
Some shows may build a three-wall set with a visible partition running down the middle, to show two rooms (usually adjacent, but sometimes not) at once.
Four-wall sets are quite rare and only for big budget shows. Even then not all of the sets will be four-wallers. The Bill and The West Wing are notable examples of integrated four-wallers, making the Walk and Talk possible. In between the three-waller and the four-waller are such sets as the bridges of the various starships Enterprise — these are built as "breakaway"note four-wallers, where one segment/wall can be removed to provide a position for the camera, and can be replaced when another angle is required.
Firefly was notable because the entire first floor of the spaceship was built as a single set (and the second floor was built as a separate single set), complete with all four walls in every room—and also providing enough in-world light sources that few if any lights were required to film any scene.
Similarly, the Scrubs set is a disused hospital (admittedly with some minor internal cosmetic alterations to make filming easier) which was purchased (or possibly rented) by the crew for the purpose of filming. Virtually all the indoor sets, including the various characters' apartments are converted rooms within this hospital. Because the set was full of actors wearing scrubs, gurneys and other assorted hospital paraphernalia, the set had to be surrounded with fencing and large 'closed set' signs to prevent members of the public walking in off the street looking for treatment. Aside from Scrubs, there are many other single-camera sitcoms that use real four-wall sets constructed on soundstages, some of them being necessary for the show's Mockumentary format.
In its early years, children's BBC drama series Grange Hill was filmed in the real classrooms of an abandoned secondary school; fortunately, it was a building with quite large rooms. Upon moving to dedicated BBC studios in 1985/86, the show started using three-walled sets; the fourth wall was either the one at the front of the classroom, or the side wall facing the classroom door. When the show was bought by Mersey Television in 2003, it moved to a new four-walled studio, as well as shooting scenes on a single camera; this gave the chance at more believably sized classrooms.
The original series of Doctor Who had nearly all of its "interiors" (including the TARDIS set) built as three-wallers, giving an overall impression of watching a play. The revamped version from 2005 onward is generally shot on four-wall sets, although the TARDIS interior was still only a three-wall set until 2010, when a new TARDIS interior was built (in full).
The BBC series Holby City converted several floors of the building containing their production offices into sets for wards, corridors, offices, etc. They even included the stairwells and lifts — and then showed this off in an episode by doing a walk-and-talk down the length of one floor, up in the lift and then back along the other floor. The building in question was also used as the exterior for Grange Hill for many years, is occasionally visible in the background of Eastenders and, from the other side (the actual front), was the office of the film studio in UFO, under which is SHADO's base...