Okay kiddo, you know when we play with water and make bubbles using soap? Something similar happens when we put water in a special machine called an electrolysis apparatus.
So, let's say we have a glass of water in the machine, which is made up of really tiny particles called molecules. These molecules have two types of atoms- hydrogen and oxygen. And the water is made up of two hydrogen atoms and one oxygen atom.
Now, the machine splits these water molecules into two different gases- hydrogen and oxygen, and we call this process electrolysis of water.
How does this happen? Well, the machine has two wires that are connected to a battery. One wire is connected to a metal plate, which is positively charged, and the other wire is connected to another plate, which is negatively charged.
So, when we turn on the machine, electricity goes through the wires and reaches the plates. The positively charged metal plate attracts the negatively charged oxygen atoms, and the negatively charged plate attracts the positively charged hydrogen atoms.
This pulls the water molecules apart, and we get bubbles of hydrogen gas and oxygen gas coming out of the machine.
So, in simple words, we take water, put it in a special machine, give it some electricity, and get two gases- hydrogen and oxygen- as a result.