Water molecules have a very special property. Each one has a positive end as well as a negative end. Molecules with this property are called polar. When you bring a charged object close to the water, it attracts the opposite charge in the mobile water molecules more than it repels the charge with the same sign. The net result is attraction, no matter what the charge of the object you use.