Floating gate MOSFETs are like mini computers in technology. They are a type of transistor (a special type of switch) that can be used to store data, just like a computer. They have three parts, a source (where the electricity flows out of), a drain (where the electricity flows in) and the floating gate (the part that stores data).
When electricity is put into the source and drain, it goes through the floating gate too, but very little of it gets stuck. Any electricity that gets stuck when the switch is on stays there even after the switch is turned off. This way, the floating gate remembers what was there before, just like a tiny computer.