I learned by having a lunge lesson, my trainer worked the horse and guided me to finding my seat and balance at the trot. If you are on your own, grab mane and try to relax, you won't have much luck if your body is tense. If you take your feet out of the stirrups and stretch them down as far physically possible for a few minutes and walk the horse around, it usually helps get your seat in the right position/more secure and you could try from there with the stirrups.
There's a lot of ugly before there is pretty! Try to lengthen your leg and open your thigh and have longer, dressage stirrups, if you have them at a jumping length. Try not to grip but really absorbe the bounce through your ankles and try to tighten your upper thigh muscles, almost where your crotch is, it's hard to explain but if you're doing it right you will be sore there the next day. Also engage your abs and sit up tall, try to be as soft on the horse's back as possible. Relax your butt. Start off at a slow pace and then when you get better you can get faster. Do a lot of bareback work because you don't really have much of a choice but to sit the trot. Do lots of it and eventually you'll get there! Good luck!!