how do I make this cut into a in the middle of the length of a board?
I'd recommend cutting this using a router, if you have one. You could use a rabbeting bit with a bearing, a router table with a fence, or clamp a board on top to act as a fence for the base of the router. These would all involve carefully starting and stopping the cut in the right place and will and leave rounded ends where the rabbet starts and ends.
If the ends of the cut really need to be square, you can finish it with a chisel.
In principle, you could use a plane, particularly something like a mortise butt plane. You'd need to define the edges of the rabbet with a chisel, then plane out the rabbet.
I wouldn't recommend it, since the plane would have little bearing surface at the edge, and keeping the cut depth uniform across the rabbet would be a miserable job.
A router (palm or plunge) can do this, using an edge guide.
Attach the edge guide to the proper distance from the edge. This might require several passes with increasing distance from the edge. If the channel is deep mill in several passes from shallow to deep.
If square corners are required a chisel will be needed to achieve them, as the router will leave rounded ones.