How to create 10 extra nodes when a node of a specific content type is created?
You might experience an infinite loop here since every time you save the node (auto-generated or not), hook_node_insert() gets invoked. To prevent this infinite loop, you can use an extra pseudo-property in your hook_node_insert() to dictate if whether or not nodes should be automatically created.

Below is an example of how your hook_node_insert() might look like:

// If the node is an auto-generated node, don't create additional nodes.
if (!isset($node-&gt;auto_generated)) {
  // Auto-generate 10 nodes.
  for ($i = 0; $i &lt; 10; $i++) {
    // Create a new node object and populate its fields.
    $node2 = new stdClass();
    $node2-&gt;language = LANGUAGE_NONE;
    $node2-&gt;type = "test";
    $node2-&gt;title = "Auto-generated (" . $node-&gt;nid . "-" . $i .")";

    $node2-&gt;created = REQUEST_TIME;
    $node2-&gt;uid = $node-&gt;uid;

    // A flag to let hook_nodeapi() implementations know that this is an automatically
    // generated node.
    $node2-&gt;auto_generated = TRUE;

    // Finally, save the node.
    node_save($node2);

    watchdog('test', "Auto-created node: &lt;pre&gt;@node&lt;/pre&gt;", array(
      '@node' =&gt; print_r($node2, TRUE),
    ));
  }
}