The easiest way to explain it I think. A regular hard drive uses spinning discs inside, like a record player. These disks are coated with a thin layer of metal that is magnetic. an arm that has an electro magnet on it can swing over the disc from inside to the outside of the platter. When the computer wants to write some data (zero's or ones) the arm moves to a "free" spot and the magnet turns on for just a split second and magnetizes a tiny spot, that makes that spot a "one".
Now how a hard drive reads...you need to know that when you pass a wire over a magnet, the magnetic field "magnetism" if you will, causes or "induces" a tiny electric current in the wire.
When the hard drive arm with the electro magnet on the end passes over the magnetic spot on the spinning disc a tiny current is induced in the read write head (electro magnet) this tiny electric current is noticed by the electronics on the hard drive and translated as a 1.
Zero's are a bit more complex, how do you know if a spot is just "blank" or a zero, there are two ways to do it. one way is to divide this platter into a fixed number of spaces and each space can be a 1 or a zero. Hard disks are indexed (encoded) so that the electronics know where the read write head is at all times and know what spot it is over. So if the computer knows it is over a certain spot, and that certain spot is not magnetized, or not as magnetized, that spot counts as a zero. The stronger the magnet is that you pass a wire over the stronger electric current is made.
The other way to do it is that some magnetic spots are "north"...let's call those 1's, some are "south or "zeros", I believe this is the current way...
Now an SSD works the same as any thumb drive or sd card. There are little "cells" on the inside, these cells are hooked to wires. Each cell is also filled with a metallic compound that melts at very low temps. The wire sends a current through the cell and "melts" the bit of metal basically, this causes it to have a different resistance to electricity going through it than "un melted" cells and this difference is a 1 or zero. That is why they also do not need electricity to keep your programs on it, reading the cells uses too little current to affect the cell.
I believe that to "unmelt" the cells current goes through with the opposite polarity. It's not so much "melting" I believe as a complex molecular change, which is beyond this simple explanation, that and I don't know more than that