From a sidelying position, prop your body up on one elbow as shown and lift your hips so that your body is straight (like a plank!). Your foot on your top leg will rest on the floor just in front of the bottom leg. Throughout this exercise maintain a light contraction of your abdominal muscles. This is called "bracing" and isn't a hard contraction, but simply "firing" those muscles so that they're being the stabilizers they're anatomically designed to be! You should try to breathe normally while you hold this position for as long as you comfortably can. When you feel your body fatiguing out of position (either due to shoulder or other fatigue), lower your body back down, roll over and do it on the other side. Build gradually to a hold time of 30-45 seconds.
When you're ready for a progression you can lift the top leg up off the floor - hovering it a couple of inches off the bottom leg.