The force of the shower water causes the air pressure in the shower cubicle to drop. Air moves from high pressure to low pressure areas. Thus air outside the shower pushes the curtain inwards.
The stronger the jet of water, the quicker the change in pressure and the sooner the shower curtain will touch you.
It's the same with hot or cold water but seems quicker with hot water because hot air is involved. It rises and decreases the air pressure in the shower.
Use ballast, rods or stickers to stop your shower curtain moving with changes in air pressure.
100 words, 554 characters