I know there are different types of memory such as ROMs,DRAMs,SRAMs,etc. I don't understand what is the type of memory on USB Flash drives that we use so often and on the hard disc of a PC. Can you please explain me?
Spinning disks use magnetisation as storage media, like audio tapes. Minuscule grains of ferromagnetic materials are magnetised in different directions.
Solid-state disks (SSD) and USB flash drive use electrostatic storage. Pieces of a conductive material (polysilicon) placed inside an isolated container (SiO2, as Quartz, glass). Using quantum mechanics magic, as "tunelling" or "hot electron injection", it is possible to charge and discharge these isolated elements ("gates") to write into the memory cell.
The electrostatic field is also able to modify the electric properties of nearby semiconductors by making them conductive ("field effect transistor")
All these element size is a few nanometers or tens of nanometers, bilionth division of a meter.