The application menu bar is merely a list of lists.
Sub-menus (nested lists) are normally hidden, but are displayed under the appropriate conditions - in this case when the mouse is over the menu label or the menu.
CSS does the rest.