if you read the manga they go through the process.
well first of all, for a cyberbrain and terminal, they just inject nanomachines into your brain. they attach at all the points and monitor every signal in your brain.
then they put the cyberbrain in and the port at the base of the skull.
using a special kind of electron microscope, they make sure that the distribution of nanomachines is correct, and they try to remove any defunct ones.
this is how the basic man machine interface occurs.
if you want to go on further and have a braincase like the major, an operation occurs where they remove your brain and a large part of the spine. they do the same process as the cyberbrain user and pop you into a cyborg body.
cyborgs can have more than one cyberbrain, although what the point of that is i dont know.