Retrieve the contents of the WordPress search query variable.
It could for example be used to show a brief message whilst displaying the user's search terms, you could use the following.
You have searched for: <?php echo esc_attr( get_search_query() ); ?>
get_search_query() is located in wp-includes/general-template.php
.