Whether you ride English or Western, it's important to understand and work with the horse's natural movement, balance and rhythm. The trot is a 2 beat rhythm where the legs work in diagonal pairs - left hind/right fore and right hind/left fore. So, the first stage of being able to rise to the trot is being aware of (feeling) your horse's rhythm. Having a lesson on the lunge line is a good way to be able to feel the horse's movement. While the instructor moves your horse up to the trot, you can just feel the movement and allow your body to move with it. Let the horse's movement lift you a little bit out of the saddle on one beat and then sit gently on the next beat. On the "up beat", don't try to get way up out of your saddle. Just roll onto you thighs while keeping your lower legs in contact with the horse's barrel. If there is day-light between you and your saddle, you are rising too high and pushing off your stirrups rather than using your legs to support you.
Once you have the rhythm sorted out, then you need to know when the horse's outside shoulder is going forward. When the horse is travelling on his left rein (doing a circle to the left) he should have a slight left bend in his body. His right shoulder is on the outside of the bend and is, therefore, the outside shoulder. To be on the "correct diagonal", you will rise (up beat) when your horse's outside shoulder is coming forward. This way, you do not interfere with your horse's balance.
Also remember that diagonals are based on turns. In a straight line, it doesn't matter much. For learning, sometimes it is easiest to ignore diagonals for a while until the basic motion is right, and you are comfortable sitting a beat and switching diagonals. After that, rise and fall with the wall works well until your body feels the motion. Long term, getting the diagonal right will help your horse move better.
Rise and fall with the leg on the wall...when the leg closest to the wall, the outside leg, is forward, you go up. It's a nice one-two-one-two-up-down-up-down motion. To switch diagonals (when you switch directions) sit one extra beat so up-down-down-up-down-up-down etc. :)
Everyone else has given you good information, I just wanted to throw in there that the reason it is correct to rise with the outside leg is because when the outside front leg moves forward the inside hind will also be moving forward. Riding while the inside hind is coming forward keeps you off the horses back for that stride making it easier for the horse to reach forward with that hind leg. Thus, allowing for better balance and correct bend.