Can anyone help me please?
How do I change from search button to search form as follows?
What is the location of the file and what code do I need to edit in order to get the result similar to the pictures?
I'm not sure if you're referring to Magento 1 or Magento 2. You've posted in the Magento 1 forum but tagged as Magento 2.
Both platforms by default show the search form so I don't know if you're using a purchased theme? You could look at the themes shipped with Magento to get insight into how it could be done.