If you have those angled ledgegrinds with the bike facing up: W + LMB, don't steer; if it's facing down: (S = optional and I wouldn't recommend it in most cases) + tapping RMB slowly.
If it's those ledges that are just a bit thick just slowly tap LMB.
If you need tips on how to properly get on the grinds that's just trial & error like any other stunt.