What is PBM?
PBM is Netpbm's bilevel format - one bit per pixel, pure black or pure white, nothing in between. It is used for scanned documents, fax-era imagery and dithered art, and its packing convention surprises people: a 1 bit means black.
What is PPM?
PPM is a Netpbm image: a tiny text header giving the dimensions, then raw pixel values with no compression whatsoever. Almost nothing displays it, which is rather the point - it is what image-processing code and academic tools emit when they want to be trivially readable.