As Passerby notes in a comment, the connector in your picture appears to be keyed. In which case it is not a generic 0.1" header connector. It may or may not have differing latching arrangements.
What is the connector called
They are called header connectors, designed for (usually) 0.1 inch pitch connectors. They mate with header pins.
The housings come as singles or as strips of several combined, you can make up cables from parts or buy pre-assembled sets like these:
The last two items are useful in that you can tear off a group of as many connectors as needed for a specific application. You can cut the cable in half to make a lead that can be soldered at one end.
The wires appear to be crimped into the connector somehow.
Usually the wire is crimped to a metal recaptacle and the assembly then is pushed into a housing that has a plastic latch to hold the assembly in place:
one side has a latching tang
use a knife to lift the retaining tang
then the wire slides out of the housing
Is there a special tool I need to re-attach them?
No, just push them back together, so long as the plastic tang is pushed into it's original position, it will lock the metal receptacle in place.