The first two forms of this function return the room associated with a given vnum, or null if there is no room associated with that vnum. For example, both room(8000) and room('8000') would return the West Gate of Bal Harbor.
The third form returns the room in which the specified character is located. The fourth form returns the room in which the specified object is located. If the object is not on the ground but in some character's equipment or inventory, it still returns the room that that character (and thus the object) is located it; it also recurses out of containers.