I answered a similar question here. The user seems to be using one of those "magazine themes" which lets you supply an image for the homepage via custom fields.
There is an easier way of doing this though. Please see this thread.
As far as a different default image for each category, something like this would probably work (inside the loop):
<?php
$custom_field_key = 'thumbnail_url';
$default_url = 'http://example.com/default-image.jpg';
$category_thumb_urls = array(
3 => 'http://example.com/image-1.jpg',
4 => 'http://example.com/image-2.jpg',
5 => 'http://example.com/image-3.jpg'
);
$url = get_post_meta( $post->ID, $custom_field_key, true );
if( !empty( $url ) && ( list( $w, $h ) = getimagesize( $url ) ) ) {
$thumbnail = $url;
}
elseif( in_category( array_keys( $category_thumb_urls ) ) ) {
foreach( $category_thumb_urls as $k => $v ) {
if( in_category( $k ) ) {
if( list( $w, $h ) = getimagesize( $v ) )
$thumbnail = $v;
}
}
}
elseif( list( $w, $h ) = getimagesize( $default_url ) )
$thumbnail = $default_url;
else
$thumbnail = false;
if ( $thumbnail )
print '<img src="' . $thumbnail . '" width="' . $w . '" height="' . $h . '" alt="" />';
?>
you'll want to change the values for the first 3 variables to match how your blog is set up. The array consists of category id for keys and thumbnail path as values. You shouldn't need to edit anything below this.
Hope this helps,
-Mike