First there is the theory. A theory is a model which is neither right nor wrong. It can be either applicable or not applicable to your situation, but that does not make the theory right or wrong. The theories at work here are: 1) water is a molecule composed of Hydrogen and Oxygen atoms, 2) electrolysis can separate molecules into their constituent atoms.
The hypothesis connects the theories to reality by making a statement which could be right or wrong. In your case it would be something like, "Electrolysis can separate water into Hydrogen and Oxygen gas."
You would then design your experiment and find out whether your hypothesis is correct or not.