A good way to learn how to do souls is to start out with stalls. Practice doing soul stalls on ledges and edges of stairs, so that you get used to the weird positions that your putting your body in. First skate up to a curb and bring up your lead foot. (lets say the left is the lead and the right is the soul) Step on the curb just like you are doing a fronside with your left. Next step up with your soul foot (right) and plant it firmly on the edge of the curb. If you cna not stay fully balanced because the soul isn't big enough you need to push in your knee so that it is over the curb. Once you are in position you should be facing parallel the curb.
Now the grind. Skate up to the bar/curb at a slight angle. By doing this, you will go up to a soul stall, but slide an inch or two. Gradually keep trying until you work your way to approaching the bar at 45 degrees.
Skate up to the rail at normal speed. Make sure you are running perfectly parallel to it, and are centered slightly to the side of the bar. Jump up and stall on the rail at this speed and angle and you'll be doing a soul grind. If you keep falling off towards the side you came from, you are not over the bar enough. Make sure to lean your knee over the bar more. It feels awkward, but it is necessary. If you keep getting caught up when you jump on, make sure you have enough speed. Also make sure you are landing your front skate on the grind plates and not between the wheels.