The nail knot is typically used to tie the fly line to the leader using a nail, needle or a tube. I like to use a cut-off straw myself. This is a useful knot when combined with the perfection loop to create a permanent end loop that allows for quick and easy leader changes.
Lay the tube parallel to the fly line and wrap the leader around itself, the tube and the fly line six or seven times. Move from left to right toward the end of the fly line and make sure to keep the loops wrapped fairly tight and close together.
Pull the leader through the tube (or alongside a nail/needle) and bring it out the other end.
Remove the tube without disturbing the wrapped leader around the fly line and pull the leader until it begins to tighten around the leader. Wet the knot before pulling it tight at both ends. Finally, trim the ends of the line and leader to finish the knot.