Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.
The vast majority* of iNES ROM files are structured like this:
header, PRG ROM, CHR ROM
-or-
header, PRG ROM
Read the first 16 bytes from the file. This is the header.
Byte 0x0004 of the header is the PRG ROM size in 16384-byte units.
Byte 0x0005 of the header is the CHR ROM size in 8192-byte units. This may be 0, in which case the cartridge uses only CHR RAM.
Now read the PRG ROM, and read the CHR ROM if it is present.
* Excluding a few mapper hacks that use an obscure iNES feature to load 512 bytes of code into PRG RAM before execution begins.
A program using CHR RAM is a melting pot, but this has the advantage of opening up several possibilities:
Fine-grained tile animation (e.g. water in Final Fantasy games)
Compression of tile data (e.g. Contra, Codemasters games)
Drawing shapes at pixel precision (e.g. Qix, Hatris, Videomation)
Displaying video generated by a coprocessor (e.g. Wide Boy)
Familiarity for people who grew up programming for other platforms (e.g. ColecoVision, Commodore 64)
The NES and Neo Geo AES are the only consoles I can think of that use CHR ROM on the cartridge at all. Everything else has onboard CHR RAM, either dedicated or unified with main RAM.