When developing a theme you should execute the wp_head and wp_footer functions in your theme’s header and footer. The functions are hooked with an action that enables other plug-ins to add necessary files and code. But it is always good to know what happens, and how to remove unwanted code.
Actions and filters are stored in a variable called $wp_filter, so I recommend that you take a peek in it. For example, to see which functions that gets executed in your header, simply look in $wp_filter['wp_head'].
Array ( .. [10] => Array ( [wp_generator] => Array ( [function] => wp_generator [accepted_args] => 1 ) .. ) )
Here you can easily see why you have all these meta-tags in your header. And if you for some reason don’t want some or any of these, use the function remove_action. Just make sure you remove the actions before the action is executed.
Example:
function remove_unwanted_actions(){
remove_action('wp_head', 'wp_generator');
}
add_action('wp', 'remove_unwanted_actions');
Now I wouldn’t recommend using this to remove default WordPress actions, but if a plug-in adds some unnecessary stylesheets this is a good way to remove them!