A simple example - You’d have a main menu table, and a submenu table, and you would assign the submenu items to a parent item.
The rest depends on how you fetch your data and display it!
--mainmenu
id title
--------------
0 Hello
1 About
2 Contact
--submenu
id assign_parent title
--------------------------
0 1 A Happy Page
1 1 Another Page
In the above example, both submenu items would go under “About” because they are assigned a foreign key based on the mainmenu’s primary key id.