In yoga triangle pose:
When entering the pose the first thing I have my students do is set up their feet.
With respect to your leg, it can be easy to lean forwards. For a deeper side stretch work at keeping your torso over your leg. You can get used to this gradually by moving back and forwards between the two positions (torso over the leg, torso leaning forwards). You could even synchronize this action with your breath.
In ashtanga yoga the usual instruction for triangle pose (or utthitta trikonasana) is to grab the big toe with the first two fingers and thumb of the lower hand. Holding onto the big toe with the bottom hand you can then focus on pulling the ribcage upwards, away from the leg. At the same time you reach up with the top arm and look up towards the top thumb.
An alternative for triangle pose is to focus on gradually letting the ribcage sink down without worrying about grabbing the big toe.
To begin with start with the hand on the thigh or shin with the elbow straight.
Slowly bend the elbow to let your ribcage sink down. Then brace your leg, and lift your hand off of your shin. Do this while inhaling and to rest, put the hand back on your shin while exhaling. As you get used to supporting your upper body using only your legs, you can add weight to the pose by reaching first one hand and then both hands to the side.
Initially you might choose to lift the hand while inhaling and support the ribcage with the bottom hand while exhaling. But then you can simply hold yoga triangle pose with both hands reaching past the head and focus on breathing slowly and smoothly.
Rather than keeping the ribcage lifted let it sink gradually towards your leg.
While holding this version of triangle pose
Note that as you sink deeper, instead of having to place your hand on your shin you can place it on the floor behind your leg.
You may also be interested in revolved (twisted) triangle
For some simple stabilizing techniques you can use in this and other poses check out the ebook: Yoga for Beginners 1.
If you prefer learning via videos, the Extreme Stability for Yoga provides a different way of stabilizing the legs, working from ground up.