Better to learn the easy way!
An edge trap is just what it sounds like: an uneven piece of whatever terrain you’re rolling over that can “trap” your front wheel on its edge. It can take that wheel (and the whole bike) right out from under you. Edge traps come in the form of pavement layers, railroad tracks, curbs, roots, holes; you get the idea. An edge trap is a hole or a rise that runs parallel to your path of travel. The front wheel falls into or up against that trap, and that makes it impossible to steer. If the bike has any momentum toward the trap your center of gravity will continue to travel in that direction while the wheels of the motorcycle do not.
Sometimes these edge traps are not super visible when it's dark or they’re hidden by traffic. Sometimes you’re forced into them by some surrounding vehicle.
If you’ve done any dirt-biking, you’ve probably gotten good at hopping over things like roots and rocks and curbs. Street riders don’t often have that kind of experience and do not know what to expect from an elevation change in the road.
RidingTips has a lot of great suggestions on how to tackle or avoid edge traps in the road, and (be warned) some videos of crashes when folks rolled up onto an edge trap and did everything wrong (but none of them are gory, I promise).
When you identify an edge trap, you must immediately gauge whether you and your bike can avoid it; that is the best course of action. If you cannot avoid it, you must approach it as close to head-on as you can. Rolling up parallel to an edge trap is the worst approach and the best way to get into an accident through loss of front wheel control.
This is the kind of thing you should practice every day when you’re out on a ride. If you do a lot of city riding, you probably encounter railroad tracks, sometimes parallel to your path of travel (Boston is lousy with tracks in roads for its commuter lines). As with any edge trap, spend as little time as possible with your tires near the tracks, and when you need to cross them do it quickly and decisively.
I’ll also recommend getting out into an empty parking lot to practice rolling over things. You’d be surprised what your motorcycle can actually tackle, and having the experience of successfully rolling over obstacles will make you a more confident rider. Start small, hit everything as perpendicular as possible, and be careful! (You're the only one in control of your handlebars; don't do anything dumb.)
Way back in the last century when I took the MSF course, they had us roll over a 4x4 piece of lumber. These days I hop granite curbs, rocks, steps and other ridiculousness on my KLR. What do you practice rolling over? Did the instructors make you roll over stuff when you took your class?