Final answer:
Heating water forms bubbles of water vapor, while electrolysis of water produces hydrogen and oxygen gas bubbles.
Step-by-step explanation:
When water is heated or has electricity passed through it, two different processes occur that cause bubbles to form. During heating, as the temperature of water increases, water vapor increases within the bubbles until boiling occurs at 100°C, forming bubbles made primarily of water vapor. In contrast, during electrolysis, where electricity passes through water containing an electrolyte, two distinct gases form: hydrogen at the cathode and oxygen at the anode, resulting in a mixture of hydrogen and oxygen gas bubbles.