Theming nodes by content type
The file node.tpl.php is used to theme certain types of nodes. This single file generically covers all content types and you can edit it to make changes across the board as detailed on the node.tpl.php handbook page. To theme individual content types in different ways, you need to create a file node-$type.tpl.php in your theme's folder, where $type is the name of the content type, for each type you wish to theme. Some examples:
- node-story.tpl.php would theme only story nodes.
- node-page.tpl.php would theme only page nodes. (Note that this is different from page.tpl.php which controls the layout of the entire page including header, sidebars, etc)
- node-forum.tpl.php would theme only forum nodes.
- node-book.tpl.php would theme only book nodes.
In general, you can replace the $type with any content type name. One exception is the flexinode custom module, which uses numbers internally to name the types. Theming flexinodes is covered in http://drupal.org/node/31646 . Also, you cannot use node-admin.tpl.php to theme just the admin pages.
Once you have this new file, copy in the contents of node.tpl.php and modify it however you wish. All the variables listed on node.tpl.php can be used. When Drupal displays a node that is the type you put in the filename, it will use this file instead of node.tpl.php.

Drupal 6
For a drupal 6 equivalent, see:
http://drupal.org/node/223440
http://drupal.org/node/223430