There are many ways to link a leader to a fly line


PIN
The first one I used was a pin. You push it up into the core of the fly line and little barbs hold it in place. They rust and sometimes pull out, so I would not recommend them. If you do use one, seal the end with a flexible cement.

LOOPS
The next type of attachment I used was loops. They promised easy leader changes and no knot tying. One can tie your own loop in the end of the fly line; by scraping away the outside covering, forming the loop, whip finishing off the connection with some 6/0 thread and adding a drop or two of flexible glue.
        Or
You can buy loop connectors at a fly shop. I believe there are three sizes. Slip the heat shrink tubing on to the end of the loop, slide the Chinese-finder-cuff like woven tube over the fly line, slide the heat shrink tube down over the end of the woven material and heat shrink it by touching it to a 100 w bulb. You could use a match or lighter if you have confidence. I would add some flexible glue worked down inside the woven material at the end of the fly line to seal the end of the fly line.
        Or
You can attach a piece of butt material about 18 inches long , using one of the following methods and tie a perfection loop in the end of that.

Loops are easy to work with, but they do result in a large mass going in and out of the guides. For small weight rods this is particularly a problem since the leader is always longer than the rod.

Knots
A nail knot can be used two ways to tie in the leader. The first is just the regular nail knot. Don't pull down too tight and use some flexible glue to seal the knot and end of the line, just in case.

The other way, and this provides more of a straight line pull at the junction, is to tie a needle-nail knot.  This is done by running a needle up the fly line (eye first using a needle vise and a rotating motion) and out the side about 1/2 to 5/8 inches from the end, pulling the needle out and reversing the path (needle in the side where it came out and out the end), hook on to the leader butt that has been tapered and pull the leader through enough to tie a nail knot at the exit point.


Glue
The last way one can hook a leader to a fly line is by gluing it. This is my preferred method up to 8wt line.

The easiest starts by scraping away the outer covering of the fly line on the last 1/2 to 5/8 inches of line. This can be totally mechanical or one can use finger nail polish remover to soften the plastic. Wash this area, your hands and the end of the leader but with soap or better yet some denatured alcohol (rubbing alcohol has oils in it). Roughen the last 1/2 inch of the leader with fine sand paper. Open the end of the fly line core with a tooth pick or bodkin. Insert the leader butt, bring it back out just a bit, put on a drop of super glue and insert it back in. Coat this area with a flexible cement to seal in and provide a smooth transition. You are all done.
      Or

The leader butt can be glued in in the fashion of the needle-nail knot. This is done by running a needle up the fly line (eye first using a needle vise and a rotating motion) and out the side about 1/2 to 5/8 inches from the end, pulling the needle out and reversing the path (needle in the side where it came out and out the end), hook on to the leader butt that has been tapered and pull the leader through enough to a point where it can be grasped by a pliers. The leader butt has been prepared by cleaning and sanding as the other glue joint was. Put a drop of super glue on the leader butt just off the end of the fly line and pull the but into the fly line core. When it stops you have a solid connection. I have pulled glued joints apart, but only with a straight line pull to a very stuck snag. Clip off the excess leader butt and coat the end with a flexible cement.


Flexible cement - Pliabond, Aquaseal (warm 15 minutes in hot water before using - this thins it out), or thinned Shoe-Goo (Lighter fluid works I am told).

Super glue - ZAP-A-GAP CA+  by Pacer. This can usually be found in fly shops and hobby shops. Other super glues have not been proven to be as long term water proof.