Picture in PC memory

Only for the pleasure of knowing.

Raw, bit-map, jpg, tiff… I have a good idea of what it is, but I have a question:
What is the structure of an image in the PC’s working memory?

Bit-map?
3 or 4 color layers in a kind of bit-map?
Does it essentially depend on the factory software?
Thank you for your lights :o)