well you question does not make a lot of sence. To open a file in binary mode you use fopen(const char *filename, "rb");... once you get the file open well then you will have to deal with the file's format.
Wotsit is a really good place to gint information of the various file formats.
QUOTE
...and copy that file's program
this is the part where I don't follow you. The data formats do not ussualy contain program information.
If you are asking how you can open the programs what use graphics and sound and find out how they work... well you CAN get yourself some debuging/disassembly/decompiling tools and work on reverse engineering the code. BUT! in most cases this is not needed as information on how to deal with graphics/sound are freely available on the web. In some cases where the file format is very proprietary you may need to reverse engineer to understand the file format, but we ussualy don't use the code directly from the program. At that point it is just easier to use it as a guide to write your own routines.
If you need more help please as a more specific question.