Any data in computer or any digital device are stored data in the form of digital bits (Logic 0 or Logic 1) and these digital bit are stored in digital memory like combination of flip flop. MicroSD card, Pen Drive etc. are contain these bit storing digital memory, and it has implemented using LSI or VLSI technology.
1) When you delete any data then the part of the memory are cleared. and store any random data, these random data are treated as free space of memory.
2) Some digital memory have the capability to store the data after removing the power supply (non volatile memory).So, your data are stored for a long time.