Would need to see a picture to give a better answer, but for most of the Bosch/BMW connectors it is a 2 step process to disconnect/re-connect. Most have a white or grey lever that 1) needs to be pulled back, then 2) pressed down, then the connector can be pulled out. In rare cases pressing the lever doesn't lift the locking tab enough to allow disconnection - in that case one can slip a small screwdriver or pick under the locking tab and lift/pry it up to allow disconnection.
When re-connecting, the locking tab slides up and over a tab (when you hear the click), and "locks" the connection together. Then the white or grey lever is pressed back in (ie, toward the junction of the connector and the sensor) to once again make disconnection a 2 step process.
See post #159 in this link for some pictures. Obviously a different connector, but process should be the same.
Hope the above makes sense.