The following is a tutorial for working in front and back loops only. To learn why and when you would want to do such a thing, please see this post.
First, remember that every stitch has two loops (indicated by the arrows):
To work in front loops only, the hook is inserted only in the front loop instead of both loops when the stitch is worked:
To work in back loops only, the hook is inserted only in the back loop instead of both loops: