How does a flight recorder record data?

Originally they were tape, however modern FDR's use solid state technology to record unto 25hours of data.