Once upon a time you only used the brakes on your motorcycle when you were straight up and down and traveling in a straight line. That was because tires were made from hard plastic, frames were wobbly, gearboxes were hard to shift and brakes made you want to leave plenty of room to jump clear in case of nonperformance. Those days are gone. With today's motorcycles, and in particular today's tires, learning to brake all the way into the apex of corners is fun, and can be good for your continued survival if done correctly.
The main thing to remember – actually, you don't have to remember it, your motorcycle will want to stand up when you apply the brakes while leaned over. Don't panic – it's the laws of physics at work, and those laws work harder the shorter and steeper-raked your motorcycle is. Part of it has to do with the tires' contact patch moving to the sides of the tread; part has to do with deceleration making the front tire want to turn in tighter, thereby steering the motorcycle upright. Whatever the causes, all you need to do is anticipate your motorcycle's reaction so you can counter it with more countersteering pressure: Force it down into the corner through the handlebars and with the inside of your thigh. Make it suffer, scrub of speed... Why bother? At the track, trail-braking into a corner is usually the fastest way through, because it allows you to carry speed further down the straight that preceded it and minimizes deceleration time. The decrease in rake and trail while you're on the brakes makes your motorcycle carve a tighter line, and engine-braking increases as the rear-tire circumference diminishes at tire's edge and raises rpm. Take advantage of it.
On the street, it seems obvious enough that being proficient at turning and braking simultaneously can only be a good thing in an emergency situation – you'll be thankful for this skill when you've overcooked a corner entrance and you're not interested in stepping on the rear brake, standing the motorcycle up and rocketing off he road into a grove of trees. But it's also a ride-enhancing thing. Naturally you're not going to gas it full speed up to corners on the street but you're not sampling all modern sportbike's performance if you don't learn to crank it into corners with the brakes on. As always, practice this skill gradually, bit by bit.