Bare wires not shown in the diagram, all connect together and connected to grounding screw of plug, if a metallic box then grounded to the grounding screw of box. At the switch box, the bare wire gets grounded to box (if a metallic box) and if the switch has a grounding screw then connect to ground also.
If you need to continue an unswitched source of power from the plug then connect the continuing cable to the black / white / bare(coming from switch) (black to black, white to white, bare to bare)
If you need to continue a switched and unswitched source of power onward then connect by pigtail method the continuing black/red/white/bare cable to: black to black, red to red, white to white, bare to bare. On the continuing cable, black would be an unswitched hot, red would be a switched hot, white is a neutral, and bare ground. If this continuing cable is going to another half switched plug then black to one brass color screw, red to the other brass color screw, white to silver color screw, bare to box (if metallic) and to grounding screw of plug. Break off joining tab between brass color screws.