I was terribly afraid of doing a zipper fly when I made my first pair of pants. And my second pair too. But when I made my THIRD pair I actually took the time to figure out why I was doing things and it started to make more sense (mainly because I drafted my own pattern and I had to)(and I royally messed up the first time and had to rip the whole thing out). So I thought I’d share my line of reasoning behind zipper flies.

First of all, unzip your jeans and take a look at how that works. If you find you’re wearing sweatpants, watch this video:
http://current.com/shows/infomania/90012248_sarah-haskins-in-target-women-medicine.htm If you’re at work reading this, don’t unzip your pants.
Alright, back to your jeans. The left side (your left since you’re wearing them; I’m always going to refer to left and right sides of the pants as if you were wearing them) overlaps the right (I just checked my husband’s pants and it seems the same for men and women). The left side of the zipper is sewn into a piece of fabric that sits BEHIND the outside left side of the pants. That backing piece of fabric is then stitched to the outside of the pants in a nice j-shaped seam that is visible for all to see (I’ll have more pictures later, right now you’re looking down your pants). The RIGHT side has a flap that is sewn in behind the zipper. This flap protects your delicates from the angry teeth of the zipper when you zip up. Got it? I will now refer to these pieces as THE FRONT and THE BACK.

So, right then, putting in your own zipper. You’ve already sewn the rest of the pants and the front seam is sewn together up to where the zipper goes in. Generally pattern instructions seem to start with the right side which is THE BACK piece. On this side you sew the right outside of your pants, the zipper, and THE BACK piece all together. THE BACK piece as you can see from the picture above is cut out on the fold, folded over, and pressed. It is all assembled as shown (EXPLODED VIEW! WOO! The blue line is actually a single line of sewing.):

So the trick here is to make that blue line of stitching as close to the edge of the outside of the pants as you can manage. That way, when the left side overlaps the right it will completely cover the zipper and this seam. This is easiest with a zipper foot which allows you to sew close to the zipper. A zipper foot is basically half a foot. You can clip it on either the right or left side depending on what you need. Your sewing machine probably came with it. It is NOT the invisible zipper foot (which is awesome, and nicely explained here:
http://grosgrainfabulous.blogspot.com/2010/07/techique-tuesday-invisible-zipper.html).

It is sewn together like so:

I basted (sew with the longest stitch on your machine, just to hold it together first) the three layers (outside, zipper, THE BACK) together first just to hold everything together and be easier to sew that real seam line in really close to the zipper. You rip out the basting stitch later. I highly recommend you baste in a dramatically different color (unlike me) so it’s easier to pull out. I start the stitch with the zipper totally open and sew down til I’m nearly at the toggle. Then I back stitch.

I pull the fabric out of the machine and close the zipper. I line my foot back up with where I stopped off stitching and start again going to the bottom. This way the whole line can be very close to the zipper teeth. In the end you get a nice seam very close to the zipper. Right side done.

Now, the left side. Interface the indicated side of THE FRONT. Sew the long straight side of THE FRONT to the right (correct) side of the outside left. Turn THE FRONT around to the inside of the pants and steam it to get the shape right. If you were wearing the pants, you don’t want to see THE FRONT piece, so make sure it sits nicely behind the outside of the pants.

You need to sew the left side of the zipper to THE FRONT piece and NOT to the outside of the pants. However, you need to know where to sew the zipper to THE FRONT piece. Smooth out your pants and arrange them like you’d like them to close. The key here is to bring the seamed edge of the left side to overlap and cover the line of stitching on the right side of the pants. So, when you arrange it the way you want, hand stitch the left side to the right side. Use a nice big stitch and a contrasting thread.

Alright, this positions your zipper over THE FRONT piece so you can see where you want to sew it together. Now fold back the outside left so only THE FRONT piece and your zipper would be under your sewing foot.

Sew those suckers together. It’s not as important here to be super close to the zipper. If you sew back a bit you don’t have to do that trick opening and closing the zipper.

Alright, you can rip out that hand sewing if you like.

And this is what you get:

Nearly done! Now you just make that decorative J-shaped stitch. The vertical part of the J holds THE FRONT to the outside left of the pants. The horizontal short arm of the J sews the outside left to the bottom of THE FRONT and the bottom of THE BACK. This keeps THE BACK in place so it protects and doesn’t flip out of position. You can either sew all three layers together at once or first sew THE FRONT to the outside left and get the curve you want, then sew the edge of THE FRONT to the back to keep it in place, which is what I do. This stitch will also anchor the bottom of your zipper, so make sure you catch it in the stitching too.

That’s it. The fly is in. You still have to do the waistband, but that’s another discussion for another time. I also didn’t talk about sizing your zipper, but that should be on the zipper package.
Take a look at some of your pants now. Everyone does flies a little differently - jeans actually tend to have more overlap of the left side, but this is the basic idea. Hope this helps. Pants aren’t hard, they’re just intimidating. And try not to curse your seam ripper too much. Good old trusty ripper-outer, how I hate having to use you. Practice makes perfect though, right? Ask if something doesn't make sense and I'll try to clarify it or fix any errors I have. I'm a bit whipped now, tutorials are harder than I thought.

I probably should have had a picture of the finished deal. Eh, look at your jeans again. It'll look just like that.
The pink pants I’m putting the fly in here are NEARLY done, I just need some buttons for the back faux-pockets and slides for the waistband closure. They’ll get posted later.