How to display sub categories

I have recently made an application where few categories are displayed. But I also want the sub categories to be displayed on clicking the parent categories menu. However I have used the following code to display the categories.
My store code is----