the inventory is brought up by a left click, or by pressing the I key.
once there it detects when your mouse has entered the window, and when it leaves it (after 1 second elapses) the window automatically shuts, this is so you dont have to actively close the window.
when inside the window you can click on an inventory item and it gets put in your hand, a right click will examine the item. you can then leave the window to use it in the game or you can click it on another item this will try to use the two items together, the results of which are defined by script.
as you can see when you hover over an item it gets a selected color, and the name of the item is placed in the lower bar, which also contains the scrolling arrows to view multiple pages of inventory.