Basically, begin by being sure to keep track of/note which color wire goes into which slot in the plastic connector.
Next you have to remove the red lock-plate (
seen in the photo above) inside each connector first (
use a probe such as a metal dental pick to get it started, and thin needed nose pliers to grab and pull), then remove the square-shouldered grey rubber gasket and unlatch/release each wire/metal connector. Unlocking the small metal connectors can be tricky, but once you see how it works, the job goes faster, and now you have skills you can use in the future with other connectors.
Use a small (1/16" wide) flat-bladed screwdriver or thin awl/needle/probe, or de-pinning tool to unlock each metal connector and then gently pull each wire outwards - use care and don't break or distort the tiny locking tabs or the body of the metal connector. If an old metal connector is dirty/green, spray it with electronic connector cleaner, or WD-40, and wipe it clean so you can see what you're doing.
To reassemble:
First thread each of the four wires thru the grey rubber gasket, being sure to confirm they are in order. Leave enough wire free so you can hear/feel the 'click' when each metal connector locks into the black plastic housing.
Next, insert each wire/metal connector into the black plastic connector body until fully seated - you may hear each one click into place. Check from the other side to confirm they are all inserted to the same depth.
When you are sure each wire/connector is fully seated, insert the red lock-plate from the open end of the connector body.
Finish by push/sliding the grey rubber gasket into the connector body from the other side, gently working it into place until it is flush with the housing.
Don't forget the red ribbed flat rubber gasket inside that helps seal the black plastic connector into the socket when you make the final connection at the MAF/coil/cam sensor. If you have trouble getting the plastic connector to fully seat, check that there is only one of the red ribbed rubber gaskets in use.
See this thread for discussion:
http://www.sccoa.com/forums/showthread.php?140147-Code-61&p=1118647#post1118647
Let me know if you need additional details.