This is done through a selector. You use a pseudo-class to indicate a specific element only to display when its parent element is in the know.
#nav li:hover > ul {
display: block;
}
This will only display ul if its parent, #nav is frozen. Ul is now a drop-down menu where you can place more list items. This will work with any number of levels that you want your drop-down menu to have.
: CSS3