How do airlines (or the government) retrieve information from the black box of an aircraft?
They send it to the manufacturer (or other lab) who knows how to get the data out.

Old black boxes stored the data on tape which they take out put in a reader and print out the data. Partially damaged tape can still be read, the result will be a data stream with holes in it.

Newer black boxes use solid state storage (like one of those 8gig memory cards). It will be put in a reader to read it out. The exact format of the data will be specific per manufacturer.

Then the analysts will make nice graphs of it for the investigators.