You can use the extrude function to do this.
Lets say you have the following mesh:
Now we need to add some extra edge loops to the area want want to extrude. This can be done by clicking CTRL + R.
Once for the top and repeat that for the bottom.
Once for the side. Do this also on the other side
Now we going to
Face Select and select the part we want to extrude
Now we can extrude the selected faces by pressing E and dragging it to the position you want.
You can add a few extra edges to it to control the subdivide but I find mostly that its not needed and just creates more vertex.
Try doing this first: https://youtu.be/7k-FPC78FZ8 then add your subsurf afterwards. Let me know if that works for you - I tried it and it looked fine.
Try making your model first without subsurf then add the subsurf after you've created the 'hole'. I just went to face mode selected the faces that I wanted protruding inwards and clicked 'I' to extrude and scale inwards then click 'E' to extrude inwards. Then go to modifiers and add subsurf - it seems to be fine but needs a little defining on the end - so I added an edge loop (Control R) on each end to keep the shape.