As someone already mentioned, jpg is great for photographs since the noise won't really be noticed on a busy background, png is better for computer generated images because artifacts will be really noticeable on text or some kind of computer interface.
It is a good idea but not strictly necessary to always run png images through
optipng or a similar program before posting them. Jpg images can also have an extremely fine amount of detail too if you play around with different compression settings, so you should experiment with jpg/png and see which one gets the smallest file size. Gifs are good too because they use indexed color modes, but you can actually also use indexed color in png files as well and get some really tiny file size with them.
Finally the difference between jpg/png really has to do with compression. Jpg generally uses lossy compression while png uses lossless compression. If I force a throw out some information associated with a png image or force a jpg to save exactly as it's shown then everything reverses, and the png is low quality and the jpg is high quality. If the previous paragraphs don't make any sense to you then don't worry about it.
In general I just throw giant png files up on the forums because I don't really care. If I uploaded content to Wikipedia or designed my own website I would spend a lot more time make the files smaller because in the long run you can save a lot of bandwidth. If you shave 200kb of an image file and you've got a million visitors a month then you can see how that adds up.

Surprise! This image is a jpg! Note that you may be able to find an artifact in here if you look really really hard, I compressed it a tiny bit to see if I could get away with it. It's at 98% quality.
EDIT: This is odd, it looks like it's gotten more artifacts over time. Maybe tinypic automatically compressed it after a bit?

Here's a really stuffty looking png. It looks a lot like a gif, doesn't it? It has 32 colors in its pallet as I recall.