If all of the DNA is being used, then how would the cell be able to store new information about pathogens in DNA? It's like a full hard drive that can't hold any more. So does the cell just compress the information about the pathogens and then just adjust the existing information about pathogens?
All the body does is produce a ton of cells that can recognize single antigens. Each time you encounter pathogens, some of these naïve cells contact antigen that can activate them. The activated clone replicates itself, forming effector cells that can deal with pathogens.
As the infection is cleared and the population of effector cells begins to contract (i.e. many die off or become anergic), some of them undergo changes which alter their migratory pattern and longevity. Some can stay in the tissue that was originally infected as tissue-resident memory cells. Some home back to the lymph node and hang there as central memory cells. The lineage is affected largely by chemical signals being produced by the tissue and other immune cells in the vicinity.
Upon re-encounter of the same pathogen, if it has some of the same antigenic determinants as the original infection, these memory cells are already known to be specific to them. Encountering the same antigen will cause these memory cells to undergo another round of clonal expansion, producing more effector cells and additional memory cells so the process can repeat. These events can be limited by telomere length or inhibitory molecules, as a caveat.
The key understanding is that the immunologic memory is actually stored in the repertoire of long-lived memory cells, and in part results from recombination events at the T or B-cell receptor locus during their maturation before they're released as naïve cells.
See: Abbas (2014). Cellular and Molecular Immunology, 8th ED., many different chapters.
You're asking for a course in immunology, which is far too long to include here.You have several misconceptions. Short and oversimplified answer, the information is not stored in one cell, but in trillions, each with a single piece of pathogen information. Within each cell, the information is stored in DNA, which in these particular cell types can be modified. Your hard drive analogy, like most such analogies, is completely misleading and you should abandon it. There are several introductions to adaptive immunity online; you might find one (such as here, here, or here) helpful.