How to migrate the menu from the site on my own theme in WordPress?

Yes, it is typically possible to re–create arbitrary markup in WordPress. However the difficulty of the task varies from easy to highly challenging. Sometimes it is easier to bend to markup WordPress gives you, than bend markup to precise state.

For navigation menus there are basically two levels of control over markup:

  1. As per wp_nav_menu() documentation it accepts number of markup–related arguments. Since menu itself is typically just a HTML list, this can be quite sufficient to customize what that list is wrapped in.
  2. The walker argument accepts an object instance to override native Walker_Nav_Menu with. Walker object contains the code that actually iterates over data structures (menu’s in this case) and processes arguments to put things together into HTML output. Customizing it gives full control over process, but the customizing itself is… acquired taste. 🙂 Plenty folks (more so new to WP) don’t like to deal with walkers.