This is taken straight out from the "Trick Tip Cult", check it out for more trick tips on rails, jumps etc.
Trick Tip: MADDECENT
Prerequisite: Know how to do a basic rail slide. Urban rails are scary to learn, but are very very similar to just grinding regular rails.
1. Come up to the rail, with your inside ski about a foot to the side of the rail
2. When you are coming to the lip, bend your knees and prepare to pop
3. Again, POP before you start to turn. The worst thing about urban rails is turning too soon and hitting your tips on the siding of the rail. Terrifying.
4. When you are in the air, bend your knees and bring your skis up to the level of the rail. Don't pop so huge that you fly in the air with straight legs and come slamming down on the rail, it makes everything much harder. You should be able to bend your knees and then just drop your skis a couple inches onto the rail, and you'll already have your knees bent to help you be centered on the rail
5. Urban rails are a little faster than ride on boxes/rails, because they’re hit less often, so be prepared to go a little faster once you hit the rail
6. Look at the end of the rail the whole time, stay calm, and you're good
I hope this helped :)