Hello Bangu,
The "wq" doesn't popup anywhere, it is a command you have to type. So you press [ESC], the cursor should jump to the bottom of the window, then you type "wq" and press [ENTER]. This writes the modified file to disk and exits the editor.
Hope this helps.