What is DDS?
DirectDraw Surface, which is how game textures are stored for the graphics card. Block-compressed so the GPU can read it without unpacking, and usually carrying a whole chain of mipmaps. Open a game's files and this is most of what you'll find.
What is PGM?
Greyscale, uncompressed, with a header you can read in a text editor. PGM is part of the netpbm family, and it exists because sometimes you want pixel values you can do arithmetic on without a decoder in the way. Image processing and computer vision code loves it.