Depending on the type of elastic you are using, you will use different methods to apply the elastic. However, the basic idea is the same. Baste your elastic on, pulling gently to ensure a secure fit. Fold your elastic under, or over, and zig-zag stitch down, pulling flat as you go. When you finish, you want your elastic to pull your leg and waist opening slightly smaller - about 2" depending on the resiliency of your elastic.
For foldover elastic -baste the elastic to the wrong side, as you would bias tape. Use a long zig-zag stitch.
Trim back any excess, fold over towards the right side, and zig-zag stitch down, pulling as you go.
If using a flat lingerie elastic, with or without a picot edge, baste onto the right side of your garment, pulling gently as you go. Stitch about 1/16" away from the edge of the elastic, furthest from the edge of your garment. For instance, if you are applying a 1/2" elastic to the waist band of your panties, baste on 7/16" away from the seam allowance. Make sense?
Trim back any excess, fold your elastic under, and top stitch down.
Voila! Two easy ways to finish off your garments... And you're done!