Take care with electricity
Materials you need are:
a torch battery
2 electrical wires (about 30 centimetres long)
2 HB pencils (sharpened at both ends)
common salt (sodium chloride)
a clear jar
a sheet of cardboard
In the clear jar, dissolve salt in enough water to half fill the jar. Sharpen both ends of both pencils to expose the graphite ('lead'). Put the cardboard sheet over the jar and punch the two HB pencils through the cardboard so that the bottom graphite is under salt water and the top graphite is above the cardboard. Connect a battery using the wires to the two HB pencils. Keep watching while it bubbles on the bottom graphite of both pencils. One pencil has oxygen gas and the other has hydrogen gas.
This process is called electrolysis. It is using electricity from the battery and the graphite electrodes to 'split' water molecules (H2O) into its components, hydrogen and oxygen.