How and where to use/place database queries when a webform is submitted? Let's say that I already created a webform with fields Customer Name, Customer Surname and Customer Address. 

When the webform is submitted, I want to insert those values captured in a custom table "Customer" created in the database that Drupal is using.

How do I achieve this? Do I have to use a specific module to insert those values? 

Is it feasible to do this by using the Rules module? If yes, can you give me a simple example on how to do this?
You can use hook_webform_submission_insert to insert data in custom table 

ie :

function hook_webform_submission_insert($node, $submission) {
  // Insert a record into a 3rd-party module table when a submission is added.
  db_insert('mymodule_table')
    -&gt;fields(array(
    'nid' =&gt; $node-&gt;nid, 
    'sid' =&gt; $submission-&gt;sid, 
    'foo' =&gt; 'foo_data',
  ))
    -&gt;execute();
}


As mentioned in above example you will find all submitted data in 

$submission


variable.