When a parent node (or subtree) is expanded (i.e. it contains child nodes and these are visible), a little [-] sign appears next to its name.
You can collapse a parent node (and hide its children) using either
(1) the mouse or
(2) the main menu or
(3) the tree popup menu or
(4) the keyboard.