Those are sidetracks. Sidetracking is done when there are problems with the borehole (it starts to collapse/deform or something gets stuck inside it) or different work needs to be done on a section (e.g. going back and coring a section that you've already drilled through to get samples). In this case, they most likely sidetracked to core, as they'd want direct samples and borehole stability is less likely to be a major problem in crystalline rock.
As far as how they do it, it's conceptually simple (these days there are "fancier" options with steerable drillbits). You put a tool down the borehole that you can expand and lock in place at the desired depth. When it's expanded, it forms a ramp towards one side of the wellbore. You then lower the drillstring, and when the bit hits the ramp, it's deflected in the direction you want it to go.