The part of the hoses that snaps onto the water tap is call a unicouple or unicoupler. The internal parts of these can wear causing them to become too loose to stay attached when under water pressure or their seals can leak.
The unicoupler used to be able to be repaired rather than needing to be totally replaced. By the way, the unicouple itself is not usually available separately but may only be sold with one or both hoses already attached from the factory.
There have been several different designs of unicouples used over the years on both dishwashers and portable washing machines. We will try to describe the differences to help you get the correct parts to repair the one used on your appliance.
The oldest style unicouple should be able to be identified by the locking collar ring. This type used a plastic covered metal collar. You may also be able to see actual ball bearings inside the top opening of the unicouple. These ball bearings are the things that actually grip the adapter mounted on the faucet nozzle.
The newer style unicouple utilizes an all plastic locking collar (white or black). Also, instead of ball bearings to grip the faucet adapter, this type used keystone shaped plastic wedges which should be visible inside the unicouple opening.
If you have an older dishwasher made by GE, these require a totally different repair kit. The original GE unicouple repair kit comes with several O-rings, a couple of retainers (that usually break upon disassembly) and new grippers that look similar to roller bearings.
For these various systems there have also been several different faucet or 'tap adapters' which screw onto a sink tap, used to mate with the dishwasher unicouples. Most commonly however there are only 2 different sizes, one of which has an aerated version (see below center). The smallest shown (rightmost below) was most commonly used on GE appliances but may be found on some other brands as well.