i normally just use tga for icons since i dont need mip maps for them . as for how to generate one . do you use gimp or photoshop. there are several tutorials out there on how to make an icon using gimp. which is how i leanred then i just applied the basic knowledge to photoshop.
here is just one of the tutorials that i found real quick.
http://cs.elderscrolls.com/constwiki/index.php/GIMP:_Creating_Inventory_Icons