Connectors are almost always composed of two mating halves; a plug that mates with a receptacle. Connector manufacturers go to a lot of trouble to make sure that the connectors mate properly and cannot be mated improperly. This article describes some of the techniques used.
Flying cable connections are normally the easiest. The user can grasp both mating parts in his or her hand. Look at the shapes; it should be obvious how they go together. Normally, this is done by having plastic shapes that only mate one way. Latches further help in orientation as well as ensure that the connectors remain mated in normal use, and even if tugged on by mistake.
When one side of the connector is fixed to a cabinet, mating with a cable, it can usually be even easier because it should be obvious how the connectors should be mated. This kind of connection is often found in wiring for all kinds of electrical equipment from lighting fixtures, to batteries and components in larger assemblies. Normally this facilitates assembly by end users.
If both mating sides of the connector are fixed into larger boxes, the mating issues become much more serious. Imagine a battery that is slid into your leaf blower, for example. Now the surfaces that capture the mating parts become much more important.
First, it must be obvious in orientation. I frequently see rectangular or triangular elements that are easily oriented before mating.
Once the plastic is engaged, the interior of the mating connector will center the plug so that it can easily find the mating contacts. This works well if the mating contact has a generous lead in.
Unfortunately, not all mating systems can afford such generous mating surfaces because they are too small. One of the techniques to alleviate this issue is to have a floating connector mounted in such a way on the metal work that the connector is centered before the contacts mate.
This kind of solution is most often used where power supplies are slid into a system where the cables are already located in the floating blind mating half in the chassis.
Another way of facilitating blind mating is to use a guide pin rigidly mounted on a panel that engages with a guide receptacle on the part that slides into the box. This is an excellent way of mating modular units into a chassis, like power supplies, disk drives, and the like. In this case, the guide pins provide initial gathering, then the plastic housings provide a further gathering, then the windows on the mating receptacle gather the mating pins; all before the contacts come into play. By using a combination of all of these gathering techniques, a well designed connector system can provide failsafe mating all the time, ensuring long life of the interconnect and a happy customer.
It is quite important that you consider the end user as you design equipment where elements will be plugged in the field. You are wise to consider how a clumsy end user might try to plug incorrectly and assure that the mating system can tolerate the mismating and make it easy and obvious how to mate properly.