How to use hook_form_search_block_form_alter? I was referring this page in the process of learning hooks How to Customize the Block Search Form and found following code.

/**
* hook_form_FORM_ID_alter
*/
function YOURTHEME_form_search_block_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $form['search_block_form']['#title'] = t('Search'); // Change the text on the label element
    $form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibilty
    $form['search_block_form']['#size'] = 40;  // define size of the textfield
    $form['search_block_form']['#default_value'] = t('Search'); // Set a default value for the textfield
    $form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button
    $form['actions']['submit'] = array('#type' =&gt; 'image_button', '#src' =&gt; base_path() . path_to_theme() . '/images/search-button.png');

    // Add extra attributes to the text box
    $form['search_block_form']['#attributes']['onblur'] = "if (this.value == '') {this.value = 'Search';}";
    $form['search_block_form']['#attributes']['onfocus'] = "if (this.value == 'Search') {this.value = '';}";
    // Prevent user from searching the default text
    $form['#attributes']['onsubmit'] = "if(this.search_block_form.value=='Search'){ alert('Please enter a search'); return false; }";

    // Alternative (HTML5) placeholder attribute instead of using the javascript
    $form['search_block_form']['#attributes']['placeholder'] = t('Search');
} 


This code is very helpful and precise to point. For example, if we want to change the placeholder, we need to put following code inside the template.php file and it works.

function YOURTHEME_form_search_block_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    $form['search_block_form']['#attributes']['placeholder'] = t('Search');
}


Now,


From the literature on api.drupal.org, I can get the information that Hook, YOURTHEME_form_FORM_ID_alter(&amp;$form, &amp;$form_state, $form_id), can be used to alter the various parts of forms.
But on that page, there is nowhere a description about any part which all are described in above first code, For example, $form['search_block_form']['#attributes']['placeholder'] = t('Search'); This code is used to change the placeholder. And same way all other like title, #title_display etc...


Why I am asking this, because for hooks all things are already defines and to use them we have to use them as they are provided, So What is the method to connect this all dots, from Hook name to what can we change with that hook.  

Precise Question,


To make this question to the point, I what to know from where on api.drupal.org shall I find out, this part $form['search_block_form']['#attributes']['placeholder']? Or how shall I come to know that, if I have to change placeholder I have to use $form['search_block_form']['#attributes']['placeholder'] this code only?
So What is the method to connect this all dots, from Hook name to what can we change with that hook.

There isn't one - each hook is different, has different input, different output, different contents, affects different parts of the system, and so on. You have to look for documentation contextual to what you're working with, each time you have something different.
In this case, you're working with a form, which means you should be referring to the Form API. From there it's an easy search to find information about #attributes:

Description: Additional HTML attributes, such as 'class' can be set using this mechanism.
Values: Any HTML attribute not covered by other properties, e.g. class (for control types), enctype (for forms).

It's basically an arbitrary pass-through of the key/value, so
$form['search_block_form']['#attributes']['foo'] = 'bar';

Will get you (e.g.)
&lt;input type=&quot;text&quot; foo=&quot;bar&quot; /&gt;