About PNG file format
PNG (Portable Network Graphic), pronounced "ping", is a graphic format intended for a lossless compression of raster graphic. This file type was developed as an improvement and replacement for the older GIF file format, which was at that time protected by patents (LZw84 algorithm). PNG offers support of 24bit color depth and compared to GIF it has no limitation of 256 colors at the same time.
PNG format has mostly already replaced GIF format, because it offers more colors and better compression (deflate algorithm + filters). On top of that it also has 8bit transparency (alpha channel), which means that the picture can be in some of it parts transparent, so called RGBA color model.
The disadvantage of PNGs over GIFs is the lack of support for simple animations. There were some attempts for such file formats, but the APNG and MNG file formats didn't make a breakthrough to became a common format.
PNG format, much like GIF and JPEG file formats, is ideal for use on internet.
Comparison to JPEG file format
JPEG can create much smaller files than PNG for photos or realistic visualizations, because it uses a lossy compression method specially designed for photographs. Portable Network Graphic format has, with the same quality, 5x - 10x larger file size compared to JPEG. On the other hand the PNG format is much better for pictures that contain text, vector based graphics or monochromatic areas and also compared to JPEG file format support transparency.
If both photo and other graphical elements are present, its matter of choice between clear lossless PNG file format or small sized lossy JPEG format. For obvious reasons, JPEG format is also bad choice for archiving pictures for later use. That makes PNG a better choice for saving photos, if you want to work with them in the future. Only the final photo, meant for distribution over internet, can be saved in JPEG format at the cost of details.
PNG pictures can also contain metadata, but their format is not strictly defined as it is in the JPEG file format. JPEGs contains metadata in Exif format that contains information about digital camera, time, exposition, etc. that are used by professional photographers.
JPEG file format is historically meant for online distribution of large photos, for it is is much better than previously used GIF file format.
Where and how to use PNG file format?
From the previous info it's clear, that Portable Network Graphic format is, thanks to its high color depth, lossless quality and especially 8bit transparency, great especially for creation of internet graphic, logos, navigation menus and other design elements used on web sites.
For this reasons, PNG format is clearly superior over JPEG, especially because of its support of transparent layer. This is especially handy for logos that can be applied on every background of the web.
Its clear that PNG file format is great for web, but JPEG will always remain the "king" of photography formats for which it was specifically designed.