The rest of the VMM together with the devices and drivers registers their statistics with STAM giving them a name. The name is hierarchical, the components separated by slashes ('/') and must start with a slash.
Each item registered with STAM - also, half incorrectly, called a sample - has a type, unit, visibility, data pointer and description associated with it in addition to the name (described above). The type tells STAM what kind of structure the pointer is pointing to. The visibility allows unused statistics from cluttering the output or showing up in the GUI. All the bits together makes STAM able to present the items in a sensible way to the user. Some types also allows STAM to reset the data, which is very convenient when digging into specific operations and such.
PS. The VirtualBox Debugger GUI has a viewer for inspecting the statistics STAM provides. You will also find statistics in the release and debug logs. And as mentioned in the introduction, the debugger console features a couple of command: .stats and .statsreset.