Data is stored on electronic media through a process called binary code. In this process, data is converted into a series of 0s and 1s, which are then recorded onto a physical medium such as a hard disk, flash drive, or CD.
When data is stored on electronic media, it is typically divided into small segments known as "blocks". These blocks are then allocated to specific locations on the physical medium, which are identified using a system of addresses.
The physical medium itself is made up of a series of tiny magnetic or optical storage cells, which can be magnetized or burnt with a laser to represent the 0s and 1s of the binary code. The data is read from the medium by a device such as a hard disk drive or CD-ROM drive, which retrieves the binary code from the appropriate locations on the medium and converts it back into the original data.
The process of storing data on electronic media has become increasingly complex over time, with new technologies such as solid-state drives and cloud storage offering faster and more efficient ways to store and access data. However, the basic principles of binary code and physical storage media remain the same.