For tips on how to override this function, see: Template Structure + Overriding Templates via a Theme.
The product search box widget loads the search box using the template function:
get_product_search_form()
For more info, see: Function get_product_search_form.
It then looks for the product search form in the file ‘product-searchform.php’ or uses its default markup. You can override the default WooCommerce template product-searchform.php by customizing the markup.
For reference, the default markup is:
The form is also run through the filter get_product_search_form.