Displaying search form on your theme files

In order to display search form on your theme, either you can use search widget on your sidebar, or you can add it manually using php template below:

<?php get_search_form( $echo ); ?>

Default WordPress Search Template

If you have a searchform.php in your theme folder, this template displays contents of that file. If you don’t WordPress displays default search template. Below you can find contents of the default search template for WordPress as provided in WordPress 4.1: