What you want is called a tree or tree view, like Windows Explorer. There are two basic options for achieving this: JavaScript or server-side code (JSP/Servlet). With JavaScript you have to serve all the data in one go. Whether this is practical depends on how much data you have. When the user clicks on a plus or minus icon your code can hide or show the sub-tree by changing the CSS "display" property. I Googled for "tree javascript", which came up with a few free options that may be of interest to you. The second option requires you to submit to the server each time an icon button is clicked. This is obviously going to be less responsive but may be more practical if large volumes of data are involved.
Also bear in mind that using JavaScript restricts your audience somewhat, i.e. it typically makes your site less accessible.
Hope that helps.
Jules