You want to be careful about bend in leg yield. The most common problem I see is that people allow the horse to bend in the base of the neck (which is NOT bend) and then when they ask for leg yield, the horse just pops his shoulder out and trots toward rail or wherever you're leg yielding to.
Leg yields should have flexion in the throat latch area, and you can let the shoulder lead slightly, but focusing too much on bend - especially if you're new to it and aren't quite sure what you're doing - is most likely going to throw the horse crooked.
Another mistake that people tend to make is to focus too much on wanting sideways motion, and end up not only overdoing the degree of angle, but also compromising the quality of the gait while doing it.
I'd suggest starting about 7-8 feet away from the arena fence - so if you're trotting around the rail, then when you are approaching the long side just turn a little early so you're about 7-8 feet in. Once you're on that inside track, trot a straight line for a few strides. If your horse has trouble staying straight on that line, then abort the leg yield plan and just work on riding a straight line away from the rail. If your horse has no problem riding a straight line off the rail, then after a few straight strides, start your leg yield.
To start leg yield, you should already have an understanding of the connection from inside leg to outside rein and how to apply it (not saying you have to be an expert, but if you're not even trying then it's just not gonna happen). So, to start the leg yield, you want to make sure that you keep your weight centered in the direction that you want the horse to carry you. In other words, a common mistake that people have is to want to "push" the horse over, and then end up with their weight mostly over the leg that's doing the pushing, which unbalances the horse and makes him not want to move away from where the weight is. For example, if you are leg yielding toward your left, away from your right leg, then you want to make sure that you don't let your weight sit on the right side of the horse. People tend to do this, thinking the leverage makes it easier to really push the horse over, but what they don't realize is that the horse wants to stay centered under you. So if you're sitting with your weight in your right hip, you're going to have a hard time asking the horse to move to the left where he will no longer feel he'd be able to support you. So to leg yield left, you'd need to have your weight more to the left so the horse will go where he feels he can support you.
You also want to avoid opening the outside rein, because he needs the support of that rein to keep him from overbending at the base of the neck. He should be leg yielding INTO your contact, so you do not have to get out of his way for him to be able to do it; instead, you need to be there for support so he knows how much to move over.
So back to the idea of coming down 7-8 feet in from the track. Ride a few straight strides, and then think of channeling your weight toward the rail, apply and release inside leg a few times, keep a soft and steady contact with the outside rein that allows the horse to move over but does not allow the horse to overbend, and ask for only just a step or two closer to the rail. As soon as you get even a foot closer to the rail, then ask for a step or two straight again, reposition and prepare, and then another step or two toward the rail, then another step or two straight. Repeat this for the entire length of the rail (you should NOT reach the rail until you're near the end - if you do, you did too much sideways) and it's okay if you don't quite make it to the rail. Just turn the corner and then do the same thing down the next long side. The most important thing is that you don't compromise the quality of the gait by letting the horse go crooked and unbalanced, and that you don't compromise your riding position by trying to push or pull him over there. He needs to learn to respond just from your inside leg and where you center your weight in your seat.
My suggestion of this exercise is based on the assumption that you've got an arena at least the length of a standard dressage arena. If you only have a small arena to ride in, then try the same exercise but maybe only 5-6 feet off the rail. If you have a much larger arena, maybe you could use ground poles to block off just a portion of it so the exercise doesn't get too strung out.