there is an infinite number of file formats. When you know the format and want to access the file content, theoretically there are a few strategies:
use the original application; it may have an API so you can interface it. Example: Office has an API through the "Primary Interop Assembly".
look for the file format specification (it may be public, it could be a public standard; it can also be proprietary), and implement your code accordingly.
Example: RTF is documented.
find a commercial product that implements #2.