Is it the soap or water that cleans your hands?

Yes to both. Water helps to mechanically and chemically remove dirt and water soluble substances. Soap dissolves fatty substances, oils, grease, etc. Soap helps destroy viruses, bacteria by messing with their cell walls; water is better than nothing. Alcohol based hand cleaners, e.g. Purell don't get rid off dirt, but can destroy viruses and bacteria-not spores though-not good enough for c. Diff diarrheas.