This article gives a brief background on the various bitmap image formats (ignores vectors) but ends abruptly in explaining their best use cases.
For those looking for a rough answer, the best rule of thumb for web work is to use jpg for actual photos (being sure to adjust the compression level to balance quality and size) and png for graphics like logos.
Jpg is well suited for large dimensions and broad color range, but on graphics with sharp edges, artifacting is definitely noticeable, making logos look blurry. Png is best here due to its support for transparency and losslessness, but a poor choice for photographs if bandwidth is any consideration. Gif works as well for graphics, but the limited color range can result in poorer edge smoothing in a trade-off for file size.
Also be aware that IE6 doesn't support transparency in pngs without implementing a simple hack first. Hopefully the days of bothering with that will soon be gone though.
For those looking for a rough answer, the best rule of thumb for web work is to use jpg for actual photos (being sure to adjust the compression level to balance quality and size) and png for graphics like logos.
Jpg is well suited for large dimensions and broad color range, but on graphics with sharp edges, artifacting is definitely noticeable, making logos look blurry. Png is best here due to its support for transparency and losslessness, but a poor choice for photographs if bandwidth is any consideration. Gif works as well for graphics, but the limited color range can result in poorer edge smoothing in a trade-off for file size.
Also be aware that IE6 doesn't support transparency in pngs without implementing a simple hack first. Hopefully the days of bothering with that will soon be gone though.